{"issue":{"user":{"id":1083668,"login":"vedratna","url":"https://api.github.com/users/vedratna","avatar_url":"https://secure.gravatar.com/avatar/88e5c48952643aa1d7384447807c0aa1?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"88e5c48952643aa1d7384447807c0aa1"},"milestone":null,"created_at":"2011-12-21T06:08:25Z","title":"fix for broken setCloseTimeout and 'IE+xhr-polling' goes into infinite loop on network disconnection","labels":[],"state":"closed","updated_at":"2011-12-21T06:11:59Z","id":2622056,"html_url":"https://github.com/LearnBoost/socket.io-client/issues/354","closed_at":"2011-12-21T06:11:36Z","pull_request":{"patch_url":"https://github.com/LearnBoost/socket.io-client/pull/354.patch","html_url":"https://github.com/LearnBoost/socket.io-client/pull/354","diff_url":"https://github.com/LearnBoost/socket.io-client/pull/354.diff"},"body":"1)  broken setCloseTimeout : setCloseTimeout is broken in this commit https://github.com/LearnBoost/socket.io-client/commit/172db2035fe10c52e94e5e77054ba0e82f0f7066#lib/transport.js. as all three flags are part of socket.js, it remains undefined all the time so setCloseTimeout never happens, it never dispatch disconnect on timeout and hence no reconnection until it gets error or disconnection from server or browser (like on disabling internet connection, safari on Mac does that)\r\n\r\n2) 'IE+xhr-polling' infinite loop : To experience this, put cosole.log inside Transport.prototype.onData. Make socket.io connection on IE with Xhr-polling (you can do it by disabling flashsocket or enabling only xhr-polling). Now disable your internet connection, you can see console flooded with log and cpu usage 100%. Issue is onerror and onload has a same listener onload, which is making recursive call of same function. So in case of error it calls the onload, which does 'self.get' (recursive call to same function), again error, again self.get and so on.","number":354,"url":"https://api.github.com/repos/LearnBoost/socket.io-client/issues/354","comments":1,"assignee":null},"comment":{"user":{"id":13041,"login":"guille","url":"https://api.github.com/users/guille","avatar_url":"https://secure.gravatar.com/avatar/486e20e16ef676a02ac0299d2f92b813?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"486e20e16ef676a02ac0299d2f92b813"},"created_at":"2011-12-21T06:11:59Z","updated_at":"2011-12-21T06:11:59Z","id":3230108,"body":"Excellent. I was skeptical about 172db2035fe10c52e94e5e77054ba0e82f0f7066 as well, I should have double checked","url":"https://api.github.com/repos/LearnBoost/socket.io-client/issues/comments/3230108"},"action":"created"}