Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Potential fix for undefined chain on dial_success #552

Merged
merged 1 commit into from Aug 6, 2020

Conversation

vihu
Copy link
Member

@vihu vihu commented Aug 5, 2020

  • Also ignore framed stream close return

- Also ignore framed stream close return
@@ -347,12 +358,12 @@ handle_banner(Banner, Stream, State) ->
case is_valid_sc(BannerSC, State) of
{error, causal_conflict} ->
lager:error("causal_conflict for banner sc: ~p", [BannerSC]),
ok = libp2p_framed_stream:close(Stream),
_ = libp2p_framed_stream:close(Stream),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you go to a throwaway _ response from the function call instead of ok here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, ideally, we'd be tracking the stream better but I think this works okay. The problem that @lthiery was running into was that we were trying to close an already closed stream, but this will just ignore the return from stream:close.

@vihu vihu merged commit e640743 into master Aug 6, 2020
@vihu vihu deleted the rg/sc-client-bugfix branch August 6, 2020 00:41
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.

None yet

2 participants