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 (#102)
… 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.
- resolves#98
@@ -115,18 +122,30 @@ class CoderRemoteEnvironment(
115
122
return actions
116
123
}
117
124
125
+
privatesuspendfuntryStopSshConnection() {
126
+
if (isConnected.value) {
127
+
connectionRequest.update {
128
+
false
129
+
}
130
+
131
+
if (isConnected.waitForFalseWithTimeout(10.seconds) ==null) {
132
+
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