Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Set disconnect flag immediately when disconnecting a peer #1521

Merged
merged 3 commits into from
Jun 3, 2019

Conversation

ajsutton
Copy link
Contributor

@ajsutton ajsutton commented Jun 3, 2019

PR description

Previously the disconnect flag was only set after callbacks were invoked. Those callbacks performed actions like closing the EthPeer RequestManager instances and other clean-up work that should only happen once no more messages are being sent. However, other threads may still send messages during that period and would not get PeerNotConnected exceptions.

Setting the flag earlier avoids this issue.

ajsutton added 2 commits June 3, 2019 11:01
Previously was only set after callbacks were invoked.
@ajsutton ajsutton merged commit 871256f into PegaSysEng:master Jun 3, 2019
@ajsutton ajsutton deleted the disconnect-flag branch June 3, 2019 21:29
iikirilov pushed a commit to Puneetha17/pantheon that referenced this pull request Jun 8, 2019
…#1521)

Previously was only set after callbacks were invoked, allowing additional messages to be sent while parts of the supporting infrastructure for the peer was being torn down.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants