mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-03 10:46:42 +01:00
Segregate handling of Tcp.ErrorClosed command from the rest of Tcp.ConnectionClosed (#4307)
* Segregate handling of Tcp.ErrorClosed command from the rest of Tcp.ConnectionClosed * Remove old match
This commit is contained in:
parent
fac0713405
commit
ce00d3ac36
1 changed files with 6 additions and 1 deletions
|
@ -290,8 +290,13 @@ case class P2PClientActor(
|
|||
context.become(awaitNetworkRequest(peerConnection, unalignedBytes))
|
||||
unalignedBytes
|
||||
|
||||
case Tcp.ErrorClosed(cause) =>
|
||||
logger.error(
|
||||
s"An error occurred in our connection with $peer, cause=$cause state=${currentPeerMsgHandlerRecv.state}")
|
||||
currentPeerMsgHandlerRecv = currentPeerMsgHandlerRecv.disconnect()
|
||||
unalignedBytes
|
||||
case closeCmd @ (Tcp.ConfirmedClosed | Tcp.Closed | Tcp.Aborted |
|
||||
Tcp.PeerClosed | Tcp.ErrorClosed(_)) =>
|
||||
Tcp.PeerClosed) =>
|
||||
logger.info(
|
||||
s"We've been disconnected by $peer command=${closeCmd} state=${currentPeerMsgHandlerRecv.state}")
|
||||
currentPeerMsgHandlerRecv = currentPeerMsgHandlerRecv.disconnect()
|
||||
|
|
Loading…
Add table
Reference in a new issue