Set default HTTP.request() timeout to 30 seconds

This commit is contained in:
Dan Stillman 2019-04-25 03:43:58 -04:00
parent 7aa68a0f75
commit 50b65b3010

View file

@ -384,9 +384,7 @@ Zotero.HTTP = new function() {
} }
// Set timeout // Set timeout
if (options.timeout) { xmlhttp.timeout = options.timeout || 30000;
xmlhttp.timeout = options.timeout;
}
xmlhttp.ontimeout = function() { xmlhttp.ontimeout = function() {
deferred.reject(new Zotero.HTTP.TimeoutException(options.timeout)); deferred.reject(new Zotero.HTTP.TimeoutException(options.timeout));