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