[ijent] Increase backlog of local port forwarding

(cherry picked from commit caed12e6878c90021e9537edb111406bb665aafc)

IJ-CR-149253

GitOrigin-RevId: 70c8dc8dd0796a099e584b21eaf5eaa3e0e3e247
This commit is contained in:
Konstantin Nisht
2024-11-13 16:38:18 +00:00
committed by intellij-monorepo-bot
parent a75c93f695
commit 9c3b0f4bbd
@@ -38,7 +38,7 @@ private val LOG: Logger = Logger.getInstance(EelTunnelsApi::class.java)
@OptIn(DelicateCoroutinesApi::class)
fun CoroutineScope.forwardLocalPort(tunnels: EelTunnelsApi, localPort: Int, address: EelTunnelsApi.HostAddress) {
val serverSocket = ServerSocket()
serverSocket.bind(InetSocketAddress("localhost", localPort))
serverSocket.bind(InetSocketAddress("localhost", localPort), 1024)
serverSocket.soTimeout = 2.seconds.toInt(DurationUnit.MILLISECONDS)
this.coroutineContext.job.invokeOnCompletion {
serverSocket.close()