diff --git a/p2p/discover/portal_protocol.go b/p2p/discover/portal_protocol.go index a56f7e6dc8..229120502c 100644 --- a/p2p/discover/portal_protocol.go +++ b/p2p/discover/portal_protocol.go @@ -690,7 +690,6 @@ func (p *PortalProtocol) processContent(target *enode.Node, resp []byte) (byte, } // Read ALL the data from the connection until EOF and return it data, err := io.ReadAll(conn) - conn.Close() if err != nil { p.Log.Error("failed to read from utp connection", "err", err) return 0xff, nil, err @@ -1190,7 +1189,6 @@ func (p *PortalProtocol) handleOffer(id enode.ID, addr *net.UDPAddr, request *po // Read ALL the data from the connection until EOF and return it var data []byte data, err = io.ReadAll(conn) - conn.Close() if err != nil { p.Log.Error("failed to read from utp connection", "err", err) return