From 50b65b3010569e2df1df283ccf24943577c6c518 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 25 Apr 2019 03:43:58 -0400 Subject: [PATCH] Set default HTTP.request() timeout to 30 seconds --- chrome/content/zotero/xpcom/http.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js index 4ff9675008..9b5c620692 100644 --- a/chrome/content/zotero/xpcom/http.js +++ b/chrome/content/zotero/xpcom/http.js @@ -384,9 +384,7 @@ Zotero.HTTP = new function() { } // Set timeout - if (options.timeout) { - xmlhttp.timeout = options.timeout; - } + xmlhttp.timeout = options.timeout || 30000; xmlhttp.ontimeout = function() { deferred.reject(new Zotero.HTTP.TimeoutException(options.timeout));