diff --git a/gold/p2p/tcp/tcp.go b/gold/p2p/tcp/tcp.go index 2c7c552..9aa9c7e 100644 --- a/gold/p2p/tcp/tcp.go +++ b/gold/p2p/tcp/tcp.go @@ -242,8 +242,11 @@ func (conn *Conn) receive(tcpconn *net.TCPConn, hasvalidated bool) { if config.ShowDebugLog { logrus.Debugln("[tcp] recv from", ep, "err:", err) } - _ = tcpconn.CloseRead() - return + if errors.Is(err, net.ErrClosed) || errors.Is(err, io.ErrClosedPipe) { + _ = tcpconn.CloseRead() + return + } + continue } if r.pckt.typ >= packetTypeTop { if config.ShowDebugLog {