Skip to content

Commit

Permalink
fixes #17089, socket not clearing timeout for LongPoll
Browse files Browse the repository at this point in the history
  • Loading branch information
dylans committed Dec 29, 2015
1 parent b1ac047 commit 47a3e2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ Socket.LongPoll = function(/*dojo.__XhrArgs*/ args){
if(!cancelled){
fire("error", {error:error}, deferred);
if(!connections.length){
clearTimeout(timeoutId);
socket.readyState = 3;
fire("close", {wasClean:false}, deferred);
}
Expand Down Expand Up @@ -205,7 +206,7 @@ Socket.LongPoll = function(/*dojo.__XhrArgs*/ args){
}
};
connect = function(){
if(socket.readyState == 0){
if(socket.readyState === 0){
// we fire the open event now because we really don't know when the "socket"
// is truly open, and this gives us a to do a send() and get it included in the
// HTTP request
Expand Down

0 comments on commit 47a3e2f

Please sign in to comment.