fix(rpc)!: preseve files when stdio channel is closed (#22137)

BREAKING CHANGE: Unsaved changes are now preserved rather than discarded
when stdio channel is closed.
This commit is contained in:
zeertzjq
2023-02-11 18:25:01 +08:00
committed by GitHub
parent 4be6c6cf0d
commit 7d58de11f4
10 changed files with 99 additions and 42 deletions

View File

@@ -550,6 +550,10 @@ void rpc_close(Channel *channel)
if (channel->streamtype == kChannelStreamStdio
|| (channel->id == ui_client_channel_id && channel->streamtype != kChannelStreamProc)) {
if (channel->streamtype == kChannelStreamStdio) {
// Avoid hanging when there are no other UIs and a prompt is triggered on exit.
remote_ui_disconnect(channel->id);
}
exit_from_channel(0);
}
}