forked from cerc-io/plugeth
p2p: don't mess with the socket deadline in Peer.readLoop
netWrapper already sets a read deadline in ReadMsg.
This commit is contained in:
parent
145330fdf2
commit
99a1db2d40
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user