Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid closing bolt state machine multiple times
Each bolt worker owns a state machine. This state machine was closed when worker exited (both cleanly and by throwing an exception) and when worker was halted. This was problematic because workers can be halted from different threads that react to Netty callbacks (`channelInactive`, `handlerRemoved` and `exceptionCaught`). In such cases state machine could be closed multiple times. This commit makes it safe to call `RunnableBoltWorker#halt()` multiple times. This method will only signal to the worker that it needs to stop and close it's state machine.
- Loading branch information
Showing
2 changed files
with
83 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters