From f587b69f3362f5ef2d0a0d4e371b9477e5193a33 Mon Sep 17 00:00:00 2001 From: Nate Hanna Date: Wed, 20 May 2020 12:06:38 -0400 Subject: [PATCH] fix: emit the browser_start when we reconnect after a lost socket connection to mimic the emit that occurs within onStart when the same state is set (#3359) --- lib/browser.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/browser.js b/lib/browser.js index 0a0360f7a..37a0c657a 100644 --- a/lib/browser.js +++ b/lib/browser.js @@ -124,6 +124,8 @@ class Browser { this.log.debug(`Lost socket connection, but browser continued to execute. Reconnected ` + `on socket ${newSocket.id}.`) this.setState(EXECUTING) + //!!! Since we lost connection but are executing make sure the browser_start event is triggered for reporting, etc. + this.emitter.emit('browser_start', this) } else if ([CONNECTED, CONFIGURING, EXECUTING].includes(this.state)) { this.log.debug(`Rebinding to new socket ${newSocket.id} (already have ` + `${this.getActiveSocketsIds()})`)