Skip to content

Commit

Permalink
Fix for #860
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarcand committed Feb 1, 2013
1 parent 00a71e6 commit 1d2b0e0
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions modules/jquery/src/main/webapp/jquery/jquery.atmosphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,15 @@ jQuery.atmosphere = function() {
_clearState();
} catch (e) {
}
return;
}

_request.id = setTimeout(function() {
setTimeout(function () {
_clearState();
}, _request.reconnectInterval)
}, _request.timeout);

}, _request.connectTimeout);
}

Expand All @@ -1068,9 +1076,13 @@ jQuery.atmosphere = function() {
};

_websocket.onmessage = function(message) {
if (message.data.indexOf("parent.callback") != -1) {
jQuery.atmosphere.log(_request.logLevel, ["parent.callback no longer supported with 0.8 version and up. Please upgrade"]);
}

clearTimeout(_request.id);
_request.id = setTimeout(function() {
setTimeout(function () {
_clearState();
}, _request.reconnectInterval)
}, _request.timeout);

if (!_handleProtocol(_request, message.data)) return;

Expand Down

0 comments on commit 1d2b0e0

Please sign in to comment.