From 9137f13ec9a432bfa6a41f6bb1f5dc114f666846 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Wed, 10 Feb 2021 01:12:41 -0800 Subject: [PATCH] Updated tunnel test error case --- modules/agent-selftest.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/agent-selftest.js b/modules/agent-selftest.js index 370574a..17a1ea4 100644 --- a/modules/agent-selftest.js +++ b/modules/agent-selftest.js @@ -1027,7 +1027,7 @@ function testTunnel() this.parent._res(); }).catch(function (e) { - this.parent._rej(' => Tunnel Test.........................[FAILED] ' + e); + ret._rej(' => Tunnel Test.........................[FAILED] '); }); return (ret); @@ -1064,11 +1064,10 @@ function setup() var ret = new promise(function (res, rej) { this._res = res; this._rej = rej; }); ret.parent = this; this._tunnelServer.promises.push(ret); - ret.timeout = setTimeout(function (r) + ret.timeout = setTimeout(function () { - r._tunnelServer.promises.shift(); - r._rej('timeout'); - }, 2000, ret); + ret._rej('timeout'); + }, 2000); ret.options = { action: 'msg', type: 'tunnel', rights: rights, consent: consent, username: '(test script)', value: 'ws://127.0.0.1:9250/test' }; this.toAgent(ret.options);