You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: rendering glitches when a Workspace is stopped while an SSH connection is alive
Toolbox raises a class cast exception when Workspaces are stopped while the SSH connection
is running. After the workspace was stopped Toolbox refused to show widget with some weird glitches
on the screen.
The fix in this case is to safely disconnect the SSH before sending the stop command to the workspace.
The code will wait at most 10 seconds for the disconnect to happen, and only after that send the stop.
@@ -106,6 +111,16 @@ class CoderRemoteEnvironment(
106
111
} else {
107
112
actions.add(Action(context.i18n.ptrl("Stop")) {
108
113
context.cs.launch {
114
+
if (isConnected.value) {
115
+
connectionRequest.update {
116
+
false
117
+
}
118
+
119
+
if (isConnected.waitForFalseWithTimeout(10.seconds) ==null) {
120
+
context.logger.warn("The SSH connection to workspace $name could not be dropped in time, going to stop the workspace while the SSH connection is live")
0 commit comments