Sfoglia il codice sorgente

p2p: don't mess with the socket deadline in Peer.readLoop

netWrapper already sets a read deadline in ReadMsg.
Felix Lange 10 anni fa
parent
commit
99a1db2d40
1 ha cambiato i file con 0 aggiunte e 1 eliminazioni
  1. 0 1
      p2p/peer.go

+ 0 - 1
p2p/peer.go

@@ -186,7 +186,6 @@ func (p *Peer) pingLoop() {
 func (p *Peer) readLoop(errc chan<- error) {
 	defer p.wg.Done()
 	for {
-		p.conn.SetDeadline(time.Now().Add(frameReadTimeout))
 		msg, err := p.rw.ReadMsg()
 		if err != nil {
 			errc <- err