diff --git a/gold/p2p/tcp/tcp.go b/gold/p2p/tcp/tcp.go index 0fd2073..bdce586 100644 --- a/gold/p2p/tcp/tcp.go +++ b/gold/p2p/tcp/tcp.go @@ -64,7 +64,10 @@ func (ep *EndPoint) Listen() (p2p.Conn, error) { addr: ep, lstn: lstn, peers: ttl.NewCacheOn(peerstimeout, [4]func(string, *net.TCPConn){ - nil, nil, func(_ string, t *net.TCPConn) { + func(_ string, t *net.TCPConn) { + _ = t.SetLinger(0) + _ = t.SetNoDelay(true) + }, nil, func(_ string, t *net.TCPConn) { err := t.CloseWrite() if config.ShowDebugLog { if err != nil {