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

Emit and Publish Peer Connection Errors #317

Merged
merged 7 commits into from
Jun 14, 2016
Merged

Emit and Publish Peer Connection Errors #317

merged 7 commits into from
Jun 14, 2016

Conversation

AdamMagaluk
Copy link
Collaborator

@AdamMagaluk AdamMagaluk commented Jun 14, 2016

Incorporates changes from #312 and includes tests.

_peer/disconnect message will container error property if PeerClient disconnected with an error. This will also be persisted in the peer registry.

William King and others added 7 commits May 17, 2016 12:39
A zetta instance's `pubsub` can be used to react to peer client
disconnect events. Currently, the _peer_client_ module will emit a
"closed" event for both a socket error *and* socket close event. This
means the zetta handle of 'error' events will never be called.

This change adds `emit('error', err)` to the _peer_client_ module, and
updates _zetta_ to publish the '_peer/disconnect' event with the
`error` object as an additional property of the published data.

`publish('_peer/disconnect'), {peer:peerClient, error: error});`

This allows code that subscribes to the peer disconnect events to
react specifically to errors.
Updated _zetta_ module to publish '_peer/error' instead of disconnect
on a peer client 'error' event. This should not cause an issues with
existing code because the 'error' event was previously never emitted.
@mdobson
Copy link
Contributor

mdobson commented Jun 14, 2016

+1

@AdamMagaluk AdamMagaluk merged commit 70312be into master Jun 14, 2016
@AdamMagaluk AdamMagaluk deleted the wooliet-master branch June 14, 2016 21:01
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.

2 participants