Skip to content

Commit 921131c

Browse files
committed
[JetBrains] improve handling of client connection termination
1 parent c6c7c7b commit 921131c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/ide/jetbrains/gateway-plugin/src/main/kotlin/io/gitpod/jetbrains/gateway/GitpodConnectionProvider.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,11 @@ class GitpodConnectionProvider : GatewayConnectionProvider {
296296
)
297297
clientHandle.clientClosed.advise(connectionLifetime) {
298298
application.invokeLater {
299-
connectionLifetime.terminate()
299+
GlobalScope.launch {
300+
// Delay for 5 seconds to wait the thinClient actually close
301+
delay(5000)
302+
connectionLifetime.terminate()
303+
}
300304
}
301305
}
302306
clientHandle.onClientPresenceChanged.advise(connectionLifetime) {

0 commit comments

Comments
 (0)