forked from microsoft/vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: gracefully disconnect better from remote (microsoft#218972)
* net: gracefully disconnect better from remote This adds in a step to gracefully disconnect (send a "disconnect" message and then await the flush) before closing the workbench. In some cases, like Remote - SSH, sending messages is more async than others. In the exec server connection we handle a `zlib.flate` stream to compress data to and from the VS Code server, and its API is asynchronous, so this lets us ensure the stream is drained before giving the go-ahead to close up shop This lifecycle phase is a little awkward and I ended it putting it directly in the lifecycle service: we don't want to do this in `onWillShutdown` because some contributions want to save data to the remote workspace, and if shutdown is vetoed it would leave a broken state. But `onDidShutdown` is synchronous and already depended upon by several other points, and changing that also felt a bit risky. cc @alexdima Refs microsoft#211462, will require some small adoption in Remote - SSH to close. * undo unrelated change * add priority to joiners * some cleanup * cleanup * tweaks * `runWithFakedTimers` * comment * 💄 --------- Co-authored-by: Benjamin Pasero <[email protected]>
- Loading branch information
1 parent
48e40d3
commit cacaccb
Showing
8 changed files
with
135 additions
and
21 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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