Skip to content
Browse files

[fix] ping-loop: Fix ping-loop break on safari

Send ping-loop even if the counter is incoherent and send a break instead of error.
  • Loading branch information...
1 parent 0fb0606 commit e0a41bd1cf166545dd31e94c624be028d164bbd1 Anthonin Bonnefoy committed Aug 12, 2011
Showing with 7 additions and 4 deletions.
  1. +4 −1 opabsl/jsbsl/bslSession.js
  2. +3 −3 oparuntime/pingRegister.ml
View
5 opabsl/jsbsl/bslSession.js
@@ -652,7 +652,10 @@ var LowLevelPingLoop = {};
error("Ping loop type "+native_response.type+" is unknown");
}
/* Relaunch loop */
- if ((nb != undefined && nb >= cpt))
+ if (!async_rpc_return){
+ internal_loop(false);
+ }
+ else if ((nb != undefined && nb >= cpt))
internal_loop(false);
}
View
6 oparuntime/pingRegister.ml
@@ -67,8 +67,8 @@ let send_json_response winfo json =
#<End>;
send_txt_response winfo txt
-let send_error winfo txt =
- winfo.HST.cont (HS.make_response ~req:winfo.HST.request Requestdef.SC_Unauthorized
+let send_unmodified winfo txt =
+ winfo.HST.cont (HS.make_response ~req:winfo.HST.request Requestdef.SC_NotModified
"text/plain" (Http_common.Result txt))
let disconnection_state_delay = 120 * 1000
@@ -278,7 +278,7 @@ module Make (S : SCHEDULER) (C : CLIENT) = struct
ping_error "PING"
"PING(%d) not registered PING(%d) already present"
n nb;
- send_error winfo "Already present"
+ send_response winfo Break
)
| Messages q ->
if Queue.is_empty q then (

0 comments on commit e0a41bd

Please sign in to comment.
Something went wrong with that request. Please try again.