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

fix: do not emit empty peer info objects #85

Merged
merged 1 commit into from
Jan 17, 2020

Conversation

achingbrain
Copy link
Member

I noticed stack traces in the logs from trying to access properties of undefined. It seems this module emits undefined peerInfo values, for example when recieving a response to your own mDNS query or a response with an invalid PeerID.

This PR guards on empty PeerInfo objects from query.gotResponse

I noticed stack traces in the logs from trying to access properties
of `undefined`. It seems this module emits `undefined` `peerInfo`
values, for example when recieving a response to your own mDNS
query or a response with an invalid PeerID.

This PR guards on empty PeerInfo objects from `query.gotResponse`
Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

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

❤️ LGTM

@jacobheun jacobheun merged commit a88483c into master Jan 17, 2020
@jacobheun jacobheun deleted the do-not-emit-empty-peer-info branch January 17, 2020 13:03
@jacobheun
Copy link
Contributor

released in 0.13.1

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