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

netWrapper already sets a read deadline in ReadMsg.
This commit is contained in:
Felix Lange 2015-04-10 13:24:10 +02:00
parent 145330fdf2
commit 99a1db2d40

View File

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