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) =>
|
||||
sendMsg(msg.bytes, g.mergeHubSink)
|
||||
case None =>
|
||||
val exn = new RuntimeException(
|
||||
s"Could not send msg=${msg.payload.commandName} because we do not have an active connection to peer=${peer} socket=$socket")
|
||||
Future.failed(exn)
|
||||
val log =
|
||||
s"Could not send msg=${msg.payload.commandName} because we do not have an active connection to peer=${peer} socket=$socket"
|
||||
logger.warn(log)
|
||||
Future.unit
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue