Skip to content

Commit fe30fd4

Browse files
committed
chore: remove dead code
1 parent f13b4e9 commit fe30fd4

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/main/kotlin/com/coder/gateway/CoderGatewayConnectionProvider.kt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package com.coder.gateway
55
import com.coder.gateway.models.RecentWorkspaceConnection
66
import com.coder.gateway.services.CoderRecentWorkspaceConnectionsService
77
import com.intellij.openapi.components.service
8-
import com.intellij.openapi.diagnostic.Logger
98
import com.intellij.openapi.rd.util.launchUnderBackgroundProgress
109
import com.intellij.remote.AuthType
1110
import com.intellij.remote.RemoteCredentialsHolder
@@ -31,7 +30,6 @@ import java.time.format.DateTimeFormatter
3130
class CoderGatewayConnectionProvider : GatewayConnectionProvider {
3231
private val recentConnectionsService = service<CoderRecentWorkspaceConnectionsService>()
3332

34-
private val connections = mutableSetOf<CoderConnectionMetadata>()
3533
private val localTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MMM-dd HH:mm")
3634

3735
override suspend fun connect(parameters: Map<String, String>, requestor: ConnectionRequestor): GatewayConnectionHandle? {
@@ -43,11 +41,6 @@ class CoderGatewayConnectionProvider : GatewayConnectionProvider {
4341
val webTerminalLink = parameters["web_terminal_link"]!!
4442

4543
if (coderWorkspaceHostname != null && projectPath != null) {
46-
val connection = CoderConnectionMetadata(coderWorkspaceHostname)
47-
if (connection in connections) {
48-
logger.warn("There is already a connection started on ${connection.workspaceHostname}")
49-
return null
50-
}
5144
val sshConfiguration = SshConfig(true).apply {
5245
setHost(coderWorkspaceHostname)
5346
setUsername("coder")
@@ -98,10 +91,4 @@ class CoderGatewayConnectionProvider : GatewayConnectionProvider {
9891
override fun isApplicable(parameters: Map<String, String>): Boolean {
9992
return parameters["type"] == "coder"
10093
}
101-
102-
companion object {
103-
val logger = Logger.getInstance(CoderGatewayConnectionProvider::class.java.simpleName)
104-
}
105-
}
106-
107-
internal data class CoderConnectionMetadata(val workspaceHostname: String)
94+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy