mirror of
https://github.com/status-im/nim-eth.git
synced 2025-01-11 14:54:33 +00:00
Make the wait + close not blocking
This commit is contained in:
parent
b62d091963
commit
42fbbb8961
@ -1207,9 +1207,9 @@ proc disconnect*(peer: Peer, reason: DisconnectionReason, notifyOtherPeer = fals
|
||||
await peer.transport.closeWait()
|
||||
|
||||
# Give the peer a chance to disconnect
|
||||
await peer.waitAndClose(2.seconds)
|
||||
traceAsyncErrors peer.waitAndClose(2.seconds)
|
||||
elif not peer.transport.closed:
|
||||
await peer.transport.closeWait()
|
||||
peer.transport.close()
|
||||
|
||||
logDisconnectedPeer peer
|
||||
peer.connectionState = Disconnected
|
||||
|
Loading…
x
Reference in New Issue
Block a user