LastExceed
02/12/2022, 7:31 AM.close .awaitClose() and .dispose() but as long as the program is running it's not letting any other programs listen on that portAleksei Tirman [JB]
02/14/2022, 8:58 AMsuspend fun main() = coroutineScope {
val selector = ActorSelectorManager(<http://Dispatchers.IO|Dispatchers.IO>)
val server = aSocket(selector).tcp().bind(InetSocketAddress("127.0.0.1", 2323))
launch {
delay(5000)
server.close()
}
while (true) {}
}
After five seconds the command netstat -tulpn | grep LISTEN | grep 2323 starts returning nothing. Could you please share a code snippet to reproduce your problem?