Skip to content

Commit d941f69

Browse files
committed
[JetBrains] improve handling of client connection termination
1 parent c1cbbc0 commit d941f69

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
@@ -297,7 +297,11 @@ class GitpodConnectionProvider : GatewayConnectionProvider {
297297
)
298298
clientHandle.clientClosed.advise(connectionLifetime) {
299299
application.invokeLater {
300-
connectionLifetime.terminate()
300+
GlobalScope.launch {
301+
// Delay for 5 seconds to wait the thinClient actually close
302+
delay(5000)
303+
connectionLifetime.terminate()
304+
}
301305
}
302306
}
303307
clientHandle.onClientPresenceChanged.advise(connectionLifetime) {

0 commit comments

Comments
 (0)