Details
-
Improvement
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
Description
Upon closing we need a round trip from the network thread to the application thread and then back to the network thread to complete the callback invocation. Currently, we don't have any of that. I think we need to refactor our closing mechanism. There are a few points to the refactor:
- The network thread should know if there's a custom user callback to trigger or not. If there is, it should wait for the callback completion to send a leave group. If not, it should proceed with the shutdown.
- The application thread sends a closing signal to the network thread and continuously polls the background event handler until time runs out.