mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-03 18:47:38 +01:00
Log instead of throwing exception when sending message to peer without an active connection (#5392)
This commit is contained in:
parent
cac546bb57
commit
d4ae659887
1 changed files with 4 additions and 3 deletions
|
@ -390,9 +390,10 @@ case class PeerConnection(peer: Peer, queue: SourceQueue[NodeStreamMessage])(
|
||||||
case Some(g) =>
|
case Some(g) =>
|
||||||
sendMsg(msg.bytes, g.mergeHubSink)
|
sendMsg(msg.bytes, g.mergeHubSink)
|
||||||
case None =>
|
case None =>
|
||||||
val exn = new RuntimeException(
|
val log =
|
||||||
s"Could not send msg=${msg.payload.commandName} because we do not have an active connection to peer=${peer} socket=$socket")
|
s"Could not send msg=${msg.payload.commandName} because we do not have an active connection to peer=${peer} socket=$socket"
|
||||||
Future.failed(exn)
|
logger.warn(log)
|
||||||
|
Future.unit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue