-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
electrumx: improve closing and fix close panic (#192)
* electrumx: fix clientConn chan double-close Prevent attempts to close the closeCh channel in clientConns more than once. Attempting to close a channel that is already closed results in a panic. The pinger was occasionally triggering a panic by calling Close when the connection had already been closed. * electrumx: wait for pinger to exit before returning in Close * electrumx: close closeCh after closing connection * electrumx: add test for closing clientConn, fix hang in Close Add TestClose to test closing clientConns. Fix hang in Close caused by the clientCh being set to nil before being read by pinger, causing pinger to never exit.
- Loading branch information
1 parent
f09d4e5
commit 05d559f
Showing
2 changed files
with
46 additions
and
3 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