Close the network Event dispatcher when done

This commit is contained in:
Robinson 2023-03-01 12:49:10 +01:00
parent e0e8d06eaf
commit b4c7203c71
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C

View File

@ -1039,10 +1039,15 @@ internal constructor(val type: Class<*>,
close0()
aeronDriver.close()
// This closes the scope and all children in the scope
eventDispatch.cancel("${type.simpleName} shutting down")
messageDispatch.cancel("${type.simpleName} shutting down")
// this will ONLY close the event dispatcher if ALL endpoints have closed it.
// when an endpoint closes, the poll-loop shuts down, and removes itself from the list of poll actions that need to be performed.
networkEventDispatcher.close()
shutdownLatch = CountDownLatch(1)
// if we are waiting for shutdown, cancel the waiting thread (since we have shutdown now)