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: requestSingleInstanceLock API sometimes hangs #33778
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 tasks
trop
bot
added
18-x-y
backport
This is a backport PR
semver/patch
backwards-compatible bug fixes
labels
Apr 13, 2022
nornagon
approved these changes
Apr 13, 2022
rzhao271
commented
Apr 14, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I refactored the code a bit so that:
- A user can now call
ackCallback
after doing a long-running operation, and we would be able to send back the ack successfully in that case. - The patch doesn't use separate
StoreAck
andSendBackAck
functions. Instead, it uses justSendBackAck
, and we create a new variablesend_ack_
inelectron_api_app
to determine whether to send back the ack. When this variable is true, we will send back the ack, and the other application will read the ack. Otherwise, the ack will not be sent back, and the other application will not read the ack. This change should prevent getting blocked by unansweredConnectNamedPipe
calls.
Edit: These changes have been reverted so that we can merge in the original critical issue fix more quickly.
rzhao271
commented
Apr 14, 2022
deepak1556
reviewed
Apr 19, 2022
rzhao271
force-pushed
the
rzhao271/connect-patch-fix
branch
from
April 19, 2022 16:59
0abc7f0
to
c77b2a9
Compare
deepak1556
approved these changes
Apr 19, 2022
deepak1556
added
backport-check-skip
Skip trop's backport validity checking
and removed
backport
This is a backport PR
labels
Apr 19, 2022
zcbenz
approved these changes
Apr 21, 2022
Release Notes Persisted
|
codebytere
pushed a commit
that referenced
this pull request
May 23, 2022
…Lock() flow (#34312) fix: revert "feat: add first-instance-ack event to the `app.requestSingleInstanceLock()` flow (#34295) * Revert "fix: requestSingleInstanceLock API ConnectNamedPipe sometimes hangs program (#33778)" This reverts commit ffb8749. * fix: revert "feat: add first-instance-ack event to the `app.requestSingleInstanceLock()` flow" * chore: update patch
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
18-x-y
backport-check-skip
Skip trop's backport validity checking
semver/patch
backwards-compatible bug fixes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Backport of #33777
Fixes #33736
CC @nornagon @deepak1556
Checklist
npm test
passesRelease Notes
Notes: Fixed an issue with the
app.requestSingleInstanceLock()
API where it would sometimes hang.