-
Notifications
You must be signed in to change notification settings - Fork 263
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
Download callback can be triggered twice. #426
Comments
nicolasnoble
added a commit
to nicolasnoble/node-pre-gyp
that referenced
this issue
Nov 3, 2018
Fixes issue mapbox#426. The `close` event will also be emitted for error cases. If a download fails, then the callback will be invoked twice with a failure, triggering the fallback-to-source case twice. This will spawn two instances of node-gyp which will most likely corrupt the build.
nicolasnoble
added a commit
to nicolasnoble/node-pre-gyp
that referenced
this issue
Nov 3, 2018
Fixes issue mapbox#426. The `close` event will also be emitted for error cases. If a download fails, then the callback will be invoked twice with a failure, triggering the fallback-to-source case twice. This will spawn two instances of node-gyp which will most likely corrupt the build.
nicolasnoble
added a commit
to nicolasnoble/node-pre-gyp
that referenced
this issue
Nov 3, 2018
Fixes issue mapbox#426. The `close` event will also be emitted for error cases. If a download fails, then the callback will be invoked twice with a failure, triggering the fallback-to-source case twice. This will spawn two instances of node-gyp which will most likely corrupt the build.
#428 fixes this one, and node-pre-gyp 0.12.0 has been released with this fix. |
hyj1991
pushed a commit
to X-Profiler/node-pre-gyp
that referenced
this issue
Jun 16, 2023
Fixes issue mapbox#426. The `close` event will also be emitted for error cases. If a download fails, then the callback will be invoked twice with a failure, triggering the fallback-to-source case twice. This will spawn two instances of node-gyp which will most likely corrupt the build.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was already reported, and a tentative fix is in #408. However, this fix doesn't do enough. The
close
callback can also be called after an error, and the fix only protects the case when the download happens correctly. One needs to also protect the error cases or the double callback problem will happens in this case.The text was updated successfully, but these errors were encountered: