Skip to content

fix: exit the editor service instead of panicking when its output is closed - #1346

Merged
dsherret merged 2 commits into
mainfrom
fix-editor-service-closed-output
Oct 11, 2026
Merged

dsherret merged 2 commits into
mainfrom
fix-editor-service-closed-output

Conversation

@dsherret

Copy link
Copy Markdown
Member

When the editor closed the editor service's output (ex. the editor exits or drops the pipe before the service has stopped), the service panicked in two places: on the thread that writes the messages when the write failed, and then with "Receiver dropped" on the next response it tried to send.

Now a failed write stops the writer thread without panicking, and the service exits cleanly the next time it can't send a response, since there's nobody left to respond to.

The test covers sending a response with a closed output not panicking and flagging the output as closed. The message loop exiting on that flag isn't covered because the test environment's output pipe can't be made to fail.

@dsherret
dsherret merged commit 0252cdf into main Oct 11, 2026
22 checks passed
@dsherret
dsherret deleted the fix-editor-service-closed-output branch October 11, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant