-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TProxy restart if gests disconnected by upstream
When gets disconnected from upstream, the TProxy kills all spawned tasks and reconnects. Add start function and put starting logic there Call this function when receive an UpstreamShutdown, after waiting a random amount of time (if there are more TProxy for the same upstream and all of them connect at the same time, it is bad) Add a cancellation token, which clones are propagated to all downstreams. If one of this clones gets cancelled, all of them get cancelled. After each spwaned task, there is a second task that checks if the token get canceled. In this case, it kills all the task above. use tokio::task in favor of async_std::task
- Loading branch information
Showing
8 changed files
with
241 additions
and
72 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.