From 82763460ef89823016bd14c8b38237800f246b28 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 3 Jul 2018 03:42:17 -0600 Subject: [PATCH] retry after bad network conn --- lib/remote.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/remote.js b/lib/remote.js index de57996..bb6d582 100644 --- a/lib/remote.js +++ b/lib/remote.js @@ -484,6 +484,11 @@ function _connect(state) { } , onError: function (err) { + if ('ENOTFOUND' === err.code) { + // DNS issue, probably network is disconnected + timeoutId = setTimeout(connect, 90 * 1000); + return; + } console.error("[tunnel error] " + err.message); console.error(err); if (connCallback) {