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

Check if the stream was closed on init #134

Merged
merged 1 commit into from
Aug 7, 2020

Conversation

ajsutton
Copy link
Contributor

@ajsutton ajsutton commented Aug 7, 2020

If the stream was aborted during init, a peerHandler may never be assigned. Need to handle that case in P2PServiceSemiDuplex.streamActive. The superclass performs the same check but it must happen before calling stream.getPeerHandler to avoid exceptions.

fixes Consensys/teku#2359

…eerHandler before attempting to access the peer handler.
Copy link

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ajsutton ajsutton merged commit 707fc4d into libp2p:develop Aug 7, 2020
@ajsutton ajsutton deleted the check-aborted branch August 7, 2020 00:51
ajsutton added a commit that referenced this pull request Aug 11, 2020
* Check if the stream was closed on init which would leave it with no peerHandler before attempting to access the peer handler. (#134)
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.

Libp2p InternalException
2 participants