From 8bf43cb03893d903532c5101301c5d0ce435fcb8 Mon Sep 17 00:00:00 2001 From: Stefan du Fresne Date: Wed, 23 Mar 2016 15:55:24 +0300 Subject: [PATCH] Extend HTTP timeout to 30 seconds By default PouchDB has a 10 second timeout for HTTP requests. To improve reliability on bad connections this ups the value to 30 seconds. NB: This is a separate value to the general replication timeout. Issue: #2134 --- static/js/services/db.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/services/db.js b/static/js/services/db.js index 3f7ffeb96a8..9c8be766280 100644 --- a/static/js/services/db.js +++ b/static/js/services/db.js @@ -27,7 +27,11 @@ var utils = require('kujua-utils'), }; var getRemote = function(name) { - return getFromCache(getRemoteUrl(name)); + return getFromCache(getRemoteUrl(name, { + ajax: { + timeout: 30000 + } + })); }; var getLocal = function(name) {