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 f4e1c33 commit 23cf8b9
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion modules/jquery/src/main/webapp/jquery/jquery.atmosphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jQuery.atmosphere = function() {
};

return {
version : "1.1.0.beta3",
version : "1.1.0.beta4",
requests : [],
callbacks : [],

Expand Down 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 @@ -1069,6 +1077,13 @@ jQuery.atmosphere = function() {

_websocket.onmessage = function(message) {

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

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

_response.state = 'messageReceived';
Expand Down

0 comments on commit 23cf8b9

Please sign in to comment.