www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit dc2d417c3d841da25e49bd16bff2eccac7580618
parent fbb0511c53cb5f95a43ea8dd1aa74b901c76e91d
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon,  5 Sep 2011 01:51:34 +0000

Make IE standalone contact attempt time out, and connector error tweak in case connector can't be contacted at all


Diffstat:
Mchrome/content/zotero/xpcom/connector/connector.js | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/connector/connector.js b/chrome/content/zotero/xpcom/connector/connector.js @@ -49,6 +49,7 @@ Zotero.Connector = new function() { Zotero.debug("Connector: Looking for Zotero Standalone"); try { var xdr = new XDomainRequest(); + xdr.timeout = 700; xdr.open("POST", "http://127.0.0.1:23119/connector/ping", true); xdr.onerror = xdr.ontimeout = function() { Zotero.debug("Connector: Zotero Standalone is not online or cannot be contacted"); @@ -137,7 +138,7 @@ Zotero.Connector = new function() { if(callback) callback(false, req.status); // Check for incompatible version - if(req.status === 404 || req.status === 412) { + if(req.status === 412) { if(Zotero.Connector_Browser && Zotero.Connector_Browser.onIncompatibleStandaloneVersion) { var standaloneVersion = req.getResponseHeader("X-Zotero-Version"); Zotero.Connector_Browser.onIncompatibleStandaloneVersion(Zotero.version, standaloneVersion);