Skip to content

Commit

Permalink
Extend HTTP timeout to 30 seconds
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SCdF committed Mar 23, 2016
1 parent 1587108 commit 8bf43cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion static/js/services/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8bf43cb

Please sign in to comment.