mbonnin
10/25/2023, 1:31 PMktor-network , is it possible to force close a ServerSocket that has active connections? I can get it to work on the JVM but SocketServer.close() hangs on macosArm64 .mbonnin
10/25/2023, 1:31 PMval selectorManager = SelectorManager(<http://Dispatchers.IO|Dispatchers.IO>)
val serverSocket = aSocket(selectorManager).tcp().bind("127.0.0.1", port)
launch {
val socket = serverSocket.accept()
launch {
delay(15.seconds)
socket.close()
// hangs here
serverSocket.close()
}
socket.openReadChannel().readInt()
}e5l
10/25/2023, 1:32 PMmbonnin
10/25/2023, 1:32 PMmbonnin
10/25/2023, 1:33 PMserverSocket.cancel() , do you mean cancelling the scope?mbonnin
10/25/2023, 1:33 PMsocket.cancel() ? (trying now... but same thing)mbonnin
10/25/2023, 1:35 PMe5l
10/25/2023, 1:36 PMmbonnin
10/25/2023, 1:36 PMmbonnin
10/25/2023, 2:30 PMe5l
10/25/2023, 2:31 PM