Skip to content

Commit

Permalink
[fix] Safari: all requests now synchronous with Safari (except ping l…
Browse files Browse the repository at this point in the history
…oop)

Otherwise, Safari gets very confused when sync and async requests are interleaved.
Of course, it'd be better to have everything asynchronous...
  • Loading branch information
François-Régis Sinot committed Oct 4, 2011
1 parent ee92891 commit 9e02e07
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions opabsl/jsbsl/bslSession.js
Expand Up @@ -373,7 +373,8 @@ var LowLevelPingLoop = {};
delete client_stored[serialized.cl_id]; delete client_stored[serialized.cl_id];
internal_ajax({ type : 'POST', internal_ajax({ type : 'POST',
url : "/chan/remove", url : "/chan/remove",
data : JSON.stringify(serialized)}); data : JSON.stringify(serialized),
async: async_rpc_return});
} }
}, },


Expand Down Expand Up @@ -428,9 +429,10 @@ var LowLevelPingLoop = {};
if (hsuccess != undefined) msg_to_post.hsuccess = serialize_uu(hsuccess); if (hsuccess != undefined) msg_to_post.hsuccess = serialize_uu(hsuccess);
var serialized_msg = JSON.stringify(msg_to_post); var serialized_msg = JSON.stringify(msg_to_post);
internal_ajax({ type : 'POST', internal_ajax({ type : 'POST',
url : "/chan/send", url : "/chan/send",
data : serialized_msg data : serialized_msg,
}); async: async_rpc_return
});
}, },


#<Ifstatic:OPA_CPS_CLIENT> #<Ifstatic:OPA_CPS_CLIENT>
Expand Down Expand Up @@ -762,7 +764,8 @@ var LowLevelPingLoop = {};
var rep = internal_ajax({ var rep = internal_ajax({
type : 'POST', type : 'POST',
async : false, async : false,
url : "/chan/sharedaddr" url : "/chan/sharedaddr",
async: async_rpc_return
}); });
shared = JSON.parse(rep.responseText); shared = JSON.parse(rep.responseText);
} }
Expand Down

0 comments on commit 9e02e07

Please sign in to comment.