mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
Update conn.go
This commit is contained in:
parent
6a7f64e760
commit
a8891b23ed
1 changed files with 2 additions and 3 deletions
|
|
@ -350,9 +350,8 @@ loop:
|
||||||
}
|
}
|
||||||
return fmt.Errorf("disconnect received: %v", pretty.Sdump(msg))
|
return fmt.Errorf("disconnect received: %v", pretty.Sdump(msg))
|
||||||
case pingMsg:
|
case pingMsg:
|
||||||
// TODO (renaynay): in the future, this should be an error
|
// PINGs should not be a response upon fresh connection
|
||||||
// (PINGs should not be a response upon fresh connection)
|
return fmt.Errorf("unexpected ping message during status exchange")
|
||||||
c.Write(baseProto, pongMsg, nil)
|
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("bad status message: code %d", code)
|
return fmt.Errorf("bad status message: code %d", code)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue