commit 210e71b8a583908ceb0d385e811fb50ee86ebbcd parent 00bb7a168b16d3fca0613c0a1591d0cb642827d0 Author: Simon Kornblith <simon@simonster.com> Date: Mon, 15 Apr 2013 13:18:21 -0400 Tweak timeouts and add additional debugging info for IE Standalone XDR Diffstat:
| M | chrome/content/zotero/xpcom/connector/connector.js | | | 11 | ++++++++--- |
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/connector/connector.js b/chrome/content/zotero/xpcom/connector/connector.js @@ -54,12 +54,17 @@ Zotero.Connector = new function() { callback(false); }; - window.setTimeout(fail, 1000); + window.setTimeout(fail, 1200); try { var xdr = new XDomainRequest(); - xdr.timeout = 700; + xdr.timeout = 1000; xdr.open("POST", "http://127.0.0.1:23119/connector/ping", true); - xdr.onerror = xdr.ontimeout = fail + xdr.onerror = function() { + Zotero.debug("Connector: XDomainRequest to Zotero Standalone experienced an error"); + }; + xdr.ontimeout = function() { + Zotero.debug("Connector: XDomainRequest to Zotero Standalone timed out"); + }; xdr.onload = function() { if(me.isOnline !== null) return; me.isOnline = true;