Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix electrum client doubling 'Disconnected' event #173

Merged
merged 4 commits into from
Jan 20, 2021
Merged

Conversation

romainbsl
Copy link
Contributor

@romainbsl romainbsl commented Jan 20, 2021

Tested with eclair-kmp-tests

Before this fix, when calling disconnect() we send a Disconnected event, that a some point cancel the coroutine job in charge of the TCP connection, that also send a Disconnected event.
So, if between those both events we try to reconnect and thus change the state (e.i. WaitingForVersion), the electrum client will go back to Closed right away.

@sstone sstone merged commit 8876962 into master Jan 20, 2021
@sstone sstone deleted the fix/electrum-client branch January 20, 2021 16:39
romainbsl pushed a commit that referenced this pull request Jan 21, 2021
sstone pushed a commit that referenced this pull request Jan 22, 2021
…adcast a Closed connection state (#176)

* Revert "Fix electrum client doubling 'Disconnected' event (#173)"

This reverts commit 8876962

* both Stop and Disconnected event goes to a ClientClosed state and broadcast a Closed connection state (fixes #174)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants