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

Fix race conditions when reloading app on device #394

Merged
merged 1 commit into from
Feb 13, 2017
Merged

Fix race conditions when reloading app on device #394

merged 1 commit into from
Feb 13, 2017

Conversation

vladimir-kotikov
Copy link
Contributor

This fixes the issues w/ starting/reloading app (introduced in #390) due to debug adapter conecting to stale app worker.

/cc @MSLaguana

Also as a side note - I'm still seeing Node's GLOBAL deprecation message, but I doubt we could avoid it because GLOBAL's setter is also configured to emit this warning (see https://github.com/nodejs/node/blob/master/lib/internal/bootstrap_node.js#L203-L219)

To avoid race conditions on app reload, when session dispatches another attach request to adapter (because app worker has sent connected' event) __before__ previous adapter instance was completely disposed we now create new instance of adapter closer to dispatching request, so session would always use new instance.
@vladimir-kotikov
Copy link
Contributor Author

Also, shouldn't we add a notice about required Node version? I searched through docs but didn't find any info about Node.js version we require for debugging?

@MSLaguana
Copy link
Member

Looks like it works great, thanks!

@MSLaguana MSLaguana merged commit 64c6648 into microsoft:master Feb 13, 2017
@vladimir-kotikov vladimir-kotikov deleted the fix-races-on-attach branch June 26, 2017 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants