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

Add optional parameter to subscribeMessage to stop resubscription on reconnect #132

Merged
merged 3 commits into from
Aug 1, 2020

Conversation

zachowj
Copy link
Contributor

@zachowj zachowj commented Jul 29, 2020

Add an optional parameter to the subscribeMessage to be able to set whether or not to re-establish the subscription after a reconnect.

Fixes: #130

lib/connection.ts Outdated Show resolved Hide resolved
lib/connection.ts Outdated Show resolved Hide resolved
README.md Outdated
@@ -363,13 +363,13 @@ Listen for events on the connection. [See docs.](#automatic-reconnecting)

Send a message to the server. Returns a promise that resolves or rejects based on the result of the server. Special case rejection is `ERR_CONNECTION_LOST` if the connection is lost while the command is in progress.

##### `conn.subscribeMessage(callback, subscribeMessage)`
##### `conn.subscribeMessage(callback, subscribeMessage[, resubscribe = true])`
Copy link
Member

Choose a reason for hiding this comment

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

This one needs updating too.

@balloob balloob merged commit 0589e81 into home-assistant:master Aug 1, 2020
@zachowj zachowj deleted the feature-resubscribe branch August 2, 2020 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

subscribeMessage resubscribing being sent before custom integration endpoint is loaded
3 participants