From c96c9b00b9bda3f810ab032d576e91a8a3c00017 Mon Sep 17 00:00:00 2001 From: Bryce Curtis Date: Mon, 27 Jun 2011 13:48:02 -0500 Subject: [PATCH] Revert to polling if there are any errors with callback server. This addresses various problems with proxies set by carriers. --- framework/assets/js/phonegap.js.base | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/framework/assets/js/phonegap.js.base b/framework/assets/js/phonegap.js.base index 4f26fd8d..d1daa555 100755 --- a/framework/assets/js/phonegap.js.base +++ b/framework/assets/js/phonegap.js.base @@ -805,13 +805,11 @@ PhoneGap.JSCallback = function() { console.log("JSCallback Error: Bad request. Stopping callbacks."); } - // If error, restart callback server + // If error, revert to polling else { console.log("JSCallback Error: Request failed."); - prompt("restartServer", "gap_callbackServer:"); - PhoneGap.JSCallbackPort = null; - PhoneGap.JSCallbackToken = null; - setTimeout(PhoneGap.JSCallback, 100); + PhoneGap.UsePolling = true; + PhoneGap.JSCallbackPolling(); } } };