diff --git a/client/main.js b/client/main.js index 8f3cfee63..e59095d7b 100644 --- a/client/main.js +++ b/client/main.js @@ -14,7 +14,7 @@ var KARMA_PROXY_PATH = constants.KARMA_PROXY_PATH var socket = io(location.host, { reconnectionDelay: 500, reconnectionDelayMax: Infinity, - timeout: 2000, + timeout: 20000, path: KARMA_PROXY_PATH + KARMA_URL_ROOT.substr(1) + 'socket.io', 'sync disconnect on unload': true }) diff --git a/lib/browser.js b/lib/browser.js index 1ff636555..9697829a1 100644 --- a/lib/browser.js +++ b/lib/browser.js @@ -151,7 +151,7 @@ class Browser { } if (this.state === CONNECTED) { - this.disconnect() + this.disconnect('client disconnected while only connected') } else if (this.state === CONFIGURING || this.state === EXECUTING) { this.log.debug('Disconnected during run, waiting %sms for reconnecting.', this.disconnectDelay) this.state = EXECUTING_DISCONNECTED @@ -159,7 +159,7 @@ class Browser { this.pendingDisconnect = this.timer.setTimeout(() => { this.lastResult.totalTimeEnd() this.lastResult.disconnected = true - this.disconnect() + this.disconnect(`reconnect failed before timeout of ${this.disconnectDelay}ms`) this.emitter.emit('browser_complete', this) }, this.disconnectDelay)