Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
forward_service: introduce shutdown checks
This commit introduces a new boolean flag, `shutdown`, to the forward_service, along with a corresponding shutdown method. It also adds checks throughout the forward_service to verify the value of the shutdown flag before retrying or invoking functions that might use the messaging service under the hood. The flag is set before messaging service shutdown, by invoking forward_service::shutdown in main. By checking the flag before each call that potentially involves the messaging service, we can ensure that the messaging service is still operational. If the flag is false, indicating that the messaging service is still active, we can proceed with the call. In the event that the messaging service is shutdown during the call, appropriate exceptions should be thrown somewhere down in called functions, avoiding potential hangs. This fix should resolve the issue where forward_service retries could block the shutdown. Fixes #12604 Closes #13922
- Loading branch information
Showing
3 changed files
with
37 additions
and
0 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
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