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

replace current websocket implementation with engine.io, made tests work in node without mocking window #356

Merged
merged 4 commits into from
May 13, 2016

Conversation

flipace
Copy link
Contributor

@flipace flipace commented May 13, 2016

2 tests fail atm

@deontologician
Copy link
Contributor

@flipace can you add me as a collaborator on your repo?

@flipace
Copy link
Contributor Author

flipace commented May 13, 2016

Done!
Am 13.05.2016 7:46 Nachm. schrieb "Josh Kuhn" [email protected]:

@flipace https://github.com/flipace can you add me as a collaborator on
your repo?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#356 (comment)

// .close is called from the client (see closeSocket), this
// listener will be removed
statusSubject.next(STATUS_DISCONNECTED)
if (e.code !== 1000 || !e.wasClean) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the bug that causes the issue. engine.io doesn't return an error object with e.code and e.wasClean defined, it's just a string. So this should be something like:

if (e !== 'forced close') {
  ... ${e}), e)
} else {
...
}

'forced close' is the close reason returned when the user calls .close on the socket

@deontologician
Copy link
Contributor

Ok, merging!

@deontologician deontologician merged commit d3330e7 into rethinkdb:next May 13, 2016
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.

2 participants