mirror of
https://github.com/corda/corda.git
synced 2025-01-30 16:14:39 +00:00
ENT-3504 Do not throw exception for missing fiber and log instead - OS version (#5292)
Change to `SingleThreadedStateMachineManager`. Instead of throwing an exception when a flow's fiber cannot be found, just log the message at info level.
This commit is contained in:
parent
8962d930d4
commit
70b2a94fda
@ -448,12 +448,12 @@ class SingleThreadedStateMachineManager(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// It happens when flows restart and the old sessions messages still arrive from a peer.
|
// It happens when flows restart and the old sessions messages still arrive from a peer.
|
||||||
logger.info("Cannot find flow corresponding to session ID $recipientId.")
|
logger.info("Cannot find flow corresponding to session ID - $recipientId.")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
val flow = mutex.locked { flows[flowId] }
|
mutex.locked { flows[flowId] }?.run {
|
||||||
?: throw IllegalStateException("Cannot find fiber corresponding to ID $flowId")
|
fiber.scheduleEvent(Event.DeliverSessionMessage(sessionMessage, deduplicationHandler, sender))
|
||||||
flow.fiber.scheduleEvent(Event.DeliverSessionMessage(sessionMessage, deduplicationHandler, sender))
|
} ?: logger.info("Cannot find fiber corresponding to flow ID $flowId")
|
||||||
}
|
}
|
||||||
} catch (exception: Exception) {
|
} catch (exception: Exception) {
|
||||||
logger.error("Exception while routing $sessionMessage", exception)
|
logger.error("Exception while routing $sessionMessage", exception)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user