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) {