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

Calling socket.disconnect() when using xhr-polling caused an infinite loop on IE8 #534

Closed
taromorimoto opened this issue Sep 22, 2011 · 6 comments
Labels
bug Something isn't working

Comments

@taromorimoto
Copy link

Calling socket.disconnect() when using xhr-polling caused an infinite loop on IE8. Changing one line helped to solve the issue. Is this a correct fix for this or are we breaking something?

In this part of the code.

Transport.prototype.onDisconnect = function () {
    if (this.close) this.close();
    this.clearTimeouts();
    this.socket.onDisconnect();
    return this;
};

Changed this.close to this.open.

    if (this.open) this.close();
@3rd-Eden
Copy link
Contributor

Looks like a good fix to me. What do you think @guille

@taromorimoto
Copy link
Author

Great, we actually added the this.close check later. So it would be.

if (this.open && this.close) this.close();

@liamdon
Copy link

liamdon commented Oct 25, 2011

Aha, socket.io-client, in socket.io.js:1330 - got it!

@playerx
Copy link

playerx commented Nov 23, 2012

+1 thanks @taromorimoto

@bf
Copy link

bf commented Dec 5, 2012

Can this somehow be changed in socket.io so I dont have to fiddle around with my npm libraries??

@sirsavary
Copy link

If this is still a problem, someone should submit a PR.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants