-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix: don't show EPIPE error #32873
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
base: develop
Are you sure you want to change the base?
fix: don't show EPIPE error #32873
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,7 +157,12 @@ export class ProjectConfigIpc extends EventEmitter { | |
|
|
||
| let resolved = false | ||
|
|
||
| this._childProcess.on('error', (err) => { | ||
| this._childProcess.on('error', (err: NodeJS.ErrnoException) => { | ||
| if (err.code === 'EPIPE') { | ||
| debug('EPIPE error in loadConfig() of child process %s', err) | ||
| return | ||
| } | ||
|
|
||
| debug('unhandled error in child process %s', err) | ||
| this.handleChildProcessError(err, this, resolved, reject) | ||
| reject(err) | ||
|
|
@@ -229,7 +234,12 @@ export class ProjectConfigIpc extends EventEmitter { | |
| return new Promise((resolve, reject) => { | ||
| let resolved = false | ||
|
|
||
| this._childProcess.on('error', (err) => { | ||
| this._childProcess.on('error', (err: NodeJS.ErrnoException) => { | ||
| if (err.code === 'EPIPE') { | ||
| debug('EPIPE error in registerSetupIpcHandlers() of child process %s', err) | ||
| return | ||
alexsch01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Early Return Traps Promises IndefinitelyWhen an |
||
|
|
||
| this.handleChildProcessError(err, this, resolved, reject) | ||
| reject(err) | ||
| }) | ||
|
|
||
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.
Bug: Unhandled Errors: Promises Hang Forever
When an
EPIPEerror occurs, the handler returns early without resolving or rejecting the promise, causingloadConfig()to hang indefinitely. The promise expects either aloadConfig:replyorloadConfig:errorevent to settle, but the early return prevents proper cleanup and leaves callers waiting forever.