Skip to content

Fix polling transports and add tests for closing transports #348

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

Merged
merged 4 commits into from
Nov 18, 2015

Conversation

nkzawa
Copy link
Contributor

@nkzawa nkzawa commented Sep 8, 2015

Added tests for #344, #340, #339 and #336.

I have to fix some codes for writing these tests.

  • add upgrading event on socket
  • fix closing polling transports

@@ -93,7 +93,6 @@ Socket.prototype.onPacket = function (packet) {
break;

case 'error':
this.transport.close();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason of socket closing becomes "transport close" if we call here.
This method will be called on clearTransport() anyway.

@Mumakil
Copy link

Mumakil commented Sep 23, 2015

We tried running this, but ended up in a situation where the websocket disconnects 30s after an upgrade from xhr-polling. My initial take would be that the event listeners from the old transport are not cleared when the client upgrades and the closeTimeout fires and emits a close event.

@nkzawa
Copy link
Contributor Author

nkzawa commented Sep 25, 2015

Thanks for your report! I will check the problem.

@nkzawa
Copy link
Contributor Author

nkzawa commented Sep 29, 2015

The problem should be fixed now.

@nicofff
Copy link

nicofff commented Oct 2, 2015

Just tested this patch. It's causing reconnects every 30s

@nkzawa
Copy link
Contributor Author

nkzawa commented Oct 3, 2015

@nicofff I just tested with socket.io but it was ok. How can I reproduce?

rauchg added a commit that referenced this pull request Nov 18, 2015
Fix polling transports and add tests for closing transports
@rauchg rauchg merged commit b79830e into socketio:master Nov 18, 2015
darrachequesne pushed a commit that referenced this pull request May 8, 2020
Also remove duplicate deps and re-add component-inherit

Closes #384, closes #358, closes #348, closes #402
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.

4 participants