cleaned up tcpserver.lyng/2

This commit is contained in:
Sergey Chernov 2026-04-09 18:28:59 +03:00
parent 805c54a408
commit 73ec8f9be6

View File

@ -13,8 +13,7 @@ launch {
val client = server.accept()
launch {
try {
val source = client.readLine()
if( source != null ) {
client.readLine()?.let { source ->
client.writeUtf8("pong: $source\n")
client.flush()
}
@ -37,7 +36,6 @@ val replies = (0..<clientCount).map { index ->
socket.flush()
val reply = socket.readLine()
assertEquals("pong: $payload", reply)
reply
} finally {
socket.close()
}