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

Stream Enabled Clients Do Not Need Close Handler #353

Merged
merged 1 commit into from
Jul 7, 2017
Merged

Stream Enabled Clients Do Not Need Close Handler #353

merged 1 commit into from
Jul 7, 2017

Conversation

wooliet
Copy link
Contributor

@wooliet wooliet commented Jun 30, 2017

The call to EventBroker.prototype.client checks the given client
instance for streamEnabled. If "true", the client is passed to
_streamEnabledClient where it has "close" and "unsubscribe" event
handlers added. If the client is not streamEnabled the event
handlers are not added.

This means that the _subscribe method only needs to make sure to
call unsubscribe on the "close" event of clients that are not
streamEnabled.


This PR is to address Issue #351

The call to `EventBroker.prototype.client` checks the given `client`
instance for `streamEnabled`. If "true", the client is passed to
`_streamEnabledClient` where it has "close" and "unsubscribe" event
handlers added. If the client is *not* `streamEnabled` the event
handlers are *not* added.

This means that the `_subscribe` method only needs to make sure to
call unsubscribe on the "close" event of clients that are not
`streamEnabled`.
@mdobson
Copy link
Contributor

mdobson commented Jul 1, 2017

👍

@AdamMagaluk AdamMagaluk merged commit a41c810 into zettajs:master Jul 7, 2017
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.

3 participants