-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
router: shutdown via endpoints, not channels
Add a .do_close() virtual method at the Endpoint level. This is already implemented by Channel, but let's also add an implementation of it to Peer which shuts down the Peer in the usual way. When the bridge gets EOF we can now call this method on all endpoints instead of creating synthetic close messages for each channel. We also stop tracking open channels for knowing when the shutdown is complete, and track endpoints instead (which is a strictly tighter constraint, as it includes endpoints with no open channels). There's the small matter of the increasingly redundant shutdown() method on routing rules, but we can clean that up soon.
- Loading branch information
1 parent
b1a49ac
commit d1b4f18
Showing
2 changed files
with
20 additions
and
8 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