@@ -31,8 +31,6 @@ import com.jetbrains.gateway.ssh.SshDeployFlowUtil
31
31
import com.jetbrains.gateway.ssh.SshMultistagePanelContext
32
32
import com.jetbrains.gateway.ssh.deploy.DeployException
33
33
import com.jetbrains.rd.util.lifetime.LifetimeDefinition
34
- import kotlinx.coroutines.GlobalScope
35
- import kotlinx.coroutines.launch
36
34
import net.schmizz.sshj.common.SSHException
37
35
import net.schmizz.sshj.connection.ConnectionException
38
36
import java.awt.Dimension
@@ -48,7 +46,7 @@ import javax.net.ssl.SSLHandshakeException
48
46
class CoderRemoteConnectionHandle {
49
47
private val recentConnectionsService = service<CoderRecentWorkspaceConnectionsService >()
50
48
51
- suspend fun connect (getParameters : (indicator: ProgressIndicator ) -> Map <String , String >) {
49
+ fun connect (getParameters : (indicator: ProgressIndicator ) -> Map <String , String >) {
52
50
val clientLifetime = LifetimeDefinition ()
53
51
clientLifetime.launchUnderBackgroundProgress(CoderGatewayBundle .message(" gateway.connector.coder.connection.provider.title" )) {
54
52
try {
@@ -79,13 +77,11 @@ class CoderRemoteConnectionHandle {
79
77
indicator.text = CoderGatewayBundle .message(" gateway.connector.coder.connecting.failed.retry" , humanizeDuration(remainingMs))
80
78
},
81
79
)
82
- GlobalScope .launch {
83
- logger.info(" Deploying and starting IDE with $context " )
84
- // At this point JetBrains takes over with their own UI.
85
- @Suppress(" UnstableApiUsage" ) SshDeployFlowUtil .fullDeployCycle(
86
- clientLifetime, context, Duration .ofMinutes(10 )
87
- )
88
- }
80
+ logger.info(" Deploying and starting IDE with $context " )
81
+ // At this point JetBrains takes over with their own UI.
82
+ @Suppress(" UnstableApiUsage" ) SshDeployFlowUtil .fullDeployCycle(
83
+ clientLifetime, context, Duration .ofMinutes(10 )
84
+ )
89
85
recentConnectionsService.addRecentConnection(parameters.toRecentWorkspaceConnection())
90
86
} catch (e: Exception ) {
91
87
if (isCancellation(e)) {
0 commit comments