fix detection of sync connection issue with new error code

This commit is contained in:
zadam 2019-03-31 18:36:12 +02:00
parent 75dbaa4b77
commit 51bede6541

View File

@ -49,7 +49,7 @@ async function sync() {
catch (e) {
proxyToggle = !proxyToggle;
if (e.message && e.message.indexOf('ECONNREFUSED') !== -1) {
if (e.message && (e.message.includes('ECONNREFUSED') || e.message.includes('ERR_CONNECTION_REFUSED'))) {
log.info("No connection to sync server.");
return {