Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] On browserRelogin, clear timeouts if socket is not null & log.warn instead of error for reconnection from unknown browser #1386

Merged
merged 2 commits into from
Dec 2, 2019

Conversation

step2yeung
Copy link
Member

Problem:

  1. On browserRelogin event, there are times where the socket is not null. When we call tryAttach() on an existing socket, eventListeners attached from tryAttach() will be duplicated.

  2. When there is an unknown browser reconnecting, app.js will throw an error and the run will fail. This could happen if a previous run's browser for some reason did not terminate.

Solutions:

  1. On browserRelogin, clear timeouts if socket is not null. This will prevent socket events duplication.

  2. log.warn instead of throwing an error for reconnection from unknown browser. This way, the current run won't be punished for dangling browsers from previous runs.

Copy link

@davecombs davecombs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am really happy to see this fix! Thank you, Stephen! Looks good to me.

@step2yeung
Copy link
Member Author

Travis failure due to sauce lab issues: #1352

@step2yeung
Copy link
Member Author

@stefanpenner Would love to get your eyes on this PR too!

@stefanpenner
Copy link
Contributor

@step2yeung LGTM – :shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants