forked from hashicorp/nomad
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When a peer shuts down, close the transport. This needs to be done in the future (i.e. when all the routines have ended), else the remove peer does not propagate correctly - this was an issue with pull request hashicorp#72. Unfortunately we cannot simply add a Close() to the Transport interface as we would break back compatibility. Therefore add a type assertion to ensure that the interface supports Close before closing it. Add a Close() method to InmemTransport so this actually gets tested. InmemTransport has nothing much to close (though it does call DisconnectAll), but other transports may do. Signed-off-by: Alex Bligh <[email protected]>
- Loading branch information
Showing
3 changed files
with
16 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