mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
Revert to polling if there are any errors with callback server. This addresses various problems with proxies set by carriers.
This commit is contained in:
parent
b059a31787
commit
c96c9b00b9
@ -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();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user