mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-04-23 21:29:02 -05:00
Merge branch 'stable'
This commit is contained in:
@@ -0,0 +1 @@
|
||||
module.exports = { buildDate:"2017-11-13T23:36:03-05:00", buildRevision: "fbce84e779951056c0e8b4d5395ee2fbe426555e" };
|
||||
+9
-2
@@ -14,6 +14,7 @@ const syncUpdate = require('./sync_update');
|
||||
const SYNC_SERVER = config['Sync']['syncServerHost'];
|
||||
const isSyncSetup = !!SYNC_SERVER;
|
||||
const SYNC_TIMEOUT = config['Sync']['syncServerTimeout'] || 5000;
|
||||
const SYNC_PROXY = config['Sync']['syncProxy'];
|
||||
|
||||
let syncInProgress = false;
|
||||
|
||||
@@ -215,14 +216,20 @@ async function syncRequest(syncContext, method, uri, body) {
|
||||
const fullUri = SYNC_SERVER + uri;
|
||||
|
||||
try {
|
||||
return await rp({
|
||||
const options = {
|
||||
method: method,
|
||||
uri: fullUri,
|
||||
jar: syncContext.cookieJar,
|
||||
json: true,
|
||||
body: body,
|
||||
timeout: SYNC_TIMEOUT
|
||||
});
|
||||
};
|
||||
|
||||
if (SYNC_PROXY) {
|
||||
options.proxy = SYNC_PROXY;
|
||||
}
|
||||
|
||||
return await rp(options);
|
||||
}
|
||||
catch (e) {
|
||||
throw new Error("Request to " + method + " " + fullUri + " failed, inner exception: " + e.stack);
|
||||
|
||||
Reference in New Issue
Block a user