Skip to content

Commit

Permalink
fix(travis): Up the socket timeout 2->20s. (#3103)
Browse files Browse the repository at this point in the history
Log something on all disconnect() calls.
Up the timeout as suggested by ndcornelius@ on #3102
  • Loading branch information
johnjbarton authored Aug 7, 2018
1 parent 173848e commit 732396a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down
4 changes: 2 additions & 2 deletions lib/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@ class Browser {
}

if (this.state === CONNECTED) {
this.disconnect()
this.disconnect('client disconnected from CONNECTED state')
} else if (this.state === CONFIGURING || this.state === EXECUTING) {
this.log.debug('Disconnected during run, waiting %sms for reconnecting.', this.disconnectDelay)
this.state = EXECUTING_DISCONNECTED

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)

Expand Down

0 comments on commit 732396a

Please sign in to comment.