Skip to content

Commit

Permalink
Incremental fix for #750
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarcand committed Dec 7, 2012
1 parent 9313b00 commit c8c4f22
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/jquery/src/main/webapp/jquery/jquery.atmosphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -1648,9 +1648,9 @@ jQuery.atmosphere = function() {

// Handles open and message event
xdr.onprogress = function() {
xdrCallback(xdr);
rq.lastMessage = xdr.responseText;
handle(xdr);
};

// Handles error event
xdr.onerror = function() {
// If the server doesn't send anything back to XDR will fail with polling
Expand All @@ -1659,7 +1659,11 @@ jQuery.atmosphere = function() {
}
};
// Handles close event
xdr.onload = function () {
xdr.onload = function() {
handle(xdr);
};

var handle = function (xdr) {
// XDomain loop forever on itself without this.
// TODO: Clearly I need to come with something better than that solution
if (rq.lastMessage == xdr.responseText) return;
Expand Down

0 comments on commit c8c4f22

Please sign in to comment.