Automattic / Automattic/browser-repl
Double prompt
- Dominant language
- JavaScript
- Stars
- 730
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
Been hitting this situation recently:

Two `prompt()`s are initiated, connected to the same client.
Not sure of the root cause, but we're getting two "connection" events inbound sometimes.
This may be a side-effect of the deps bumps I did. :/
Meanwhile, I've noticed that the `vm.get` callback sometimes starts much later than the socket's "connection" event. I moved `start()` into that callback in https://github.com/Automattic/browser-repl/commit/3b834cb80663106caa542b84be441cba70a3ffb6 but I think it's a race condition either way.
To me, feels like the fix to both is **only starting the prompt once both wd and the socket are ready**
Hows that sound?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.