Skip to content

Commit 7b4b081

Browse files
committed
Revert "fix: close conn after read"
This reverts commit c676684.
1 parent 3a13371 commit 7b4b081

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

p2p/discover/portal_protocol.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,6 @@ func (p *PortalProtocol) processContent(target *enode.Node, resp []byte) (byte,
690690
}
691691
// Read ALL the data from the connection until EOF and return it
692692
data, err := io.ReadAll(conn)
693-
conn.Close()
694693
if err != nil {
695694
p.Log.Error("failed to read from utp connection", "err", err)
696695
return 0xff, nil, err
@@ -1190,7 +1189,6 @@ func (p *PortalProtocol) handleOffer(id enode.ID, addr *net.UDPAddr, request *po
11901189
// Read ALL the data from the connection until EOF and return it
11911190
var data []byte
11921191
data, err = io.ReadAll(conn)
1193-
conn.Close()
11941192
if err != nil {
11951193
p.Log.Error("failed to read from utp connection", "err", err)
11961194
return

0 commit comments

Comments
 (0)