Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

fix: catch newStream errors #34

Merged
merged 3 commits into from
Jan 7, 2020
Merged

fix: catch newStream errors #34

merged 3 commits into from
Jan 7, 2020

Conversation

jacobheun
Copy link
Contributor

  • Connection.newStream can throw errors and they weren't being caught. This now catches and logs those errors.
  • If a disconnection occurred for a peer we are not tracking, removePeer would be called with undefined which would throw an error. This fixes that by checking for its existence before attempting to remove it.

Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

LGTM!

@vasco-santos vasco-santos merged commit 57453d4 into master Jan 7, 2020
@vasco-santos vasco-santos deleted the fix/connections branch January 7, 2020 17:00
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