mirror of https://github.com/status-im/nim-eth.git
Fix accidential usage of default rlp decode for DisconnectionReason (#572)
This commit is contained in:
parent
2b5f2a27e3
commit
40ec601d07
|
@ -708,7 +708,7 @@ proc waitSingleMsg(peer: Peer, MsgType: type): Future[MsgType] {.async.} =
|
||||||
"Invalid RLPx message body")
|
"Invalid RLPx message body")
|
||||||
|
|
||||||
elif nextMsgId == 1: # p2p.disconnect
|
elif nextMsgId == 1: # p2p.disconnect
|
||||||
let reasonList = rlp.read(nextMsgData, DisconnectionReasonList)
|
let reasonList = nextMsgData.read(DisconnectionReasonList)
|
||||||
let reason = reasonList.value
|
let reason = reasonList.value
|
||||||
await peer.disconnect(reason)
|
await peer.disconnect(reason)
|
||||||
trace "disconnect message received in waitSingleMsg", reason, peer
|
trace "disconnect message received in waitSingleMsg", reason, peer
|
||||||
|
|
Loading…
Reference in New Issue