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

Unset client ID when stopped #80

Merged
merged 1 commit into from
May 19, 2014
Merged

Unset client ID when stopped #80

merged 1 commit into from
May 19, 2014

Conversation

jugglinmike
Copy link
Collaborator

When the client invokes stop, it is signalling an explicit intent to
disconnect. Therefore, subsequent connections should not be considered
'resume' events, but complete 'begin' events in their own right.

By unsetting the client ID, multiple run invocations each behave
identically (each sending a new 'begin' event to the server), and the
'resume' event is reserved for only unexpected re-connections.

The current behavior is causing an error in my application because we are also using the "resource" conviguration for Socket.io to differentiate connections. When the user switches between connections, the "resume" event triggered by the server is labeled as "invalid".

When the client invokes `stop`, it is signalling an explicit intent to
disconnect. Therefore, subsequent connections should not be considered
'resume' events, but complete 'begin' events in their own right.

By unsetting the client ID, multiple `run` invocations each behave
identically (each sending a new 'begin' event to the server), and the
'resume' event is reserved for only unexpected re-connections.
incompl pushed a commit that referenced this pull request May 19, 2014
Unset client ID when stopped
@incompl incompl merged commit 605f221 into incompl:master May 19, 2014
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