From 210e71b8a583908ceb0d385e811fb50ee86ebbcd Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 15 Apr 2013 13:18:21 -0400 Subject: [PATCH] Tweak timeouts and add additional debugging info for IE Standalone XDR --- 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 index 3f4f91a8ee..5a575c375d 100644 --- 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;