-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix event loop thread might exit unexpectedly (#217)
Fixes #209 ### Motivation When the event loop thread is started from `ExecutorService::restart`, there is a chance that `io_service_.run(ec)` returns immediately. In this case, the `ClientConnection::resolver_` that was registered in the IO service could block forever in `async_resolve` method. ### Modifications In the event loop thread, if the `io_service::run` method is not stopped by `ExecutorService::close`, just call `restart` and `run` again to avoid the event loop thread exits unexpectedly. Run the `ConnectionFailTest` independently with `--gtest_repeat=20` to avoid it's still flaky.
- Loading branch information
1 parent
2108d54
commit e2de5fc
Showing
3 changed files
with
14 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
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