diff --git a/examples/rendezvous_server/rendezvous_server.nim b/examples/rendezvous_server/rendezvous_server.nim index ac25bb7..4e56def 100644 --- a/examples/rendezvous_server/rendezvous_server.nim +++ b/examples/rendezvous_server/rendezvous_server.nim @@ -34,7 +34,8 @@ proc processClient(client: AsyncSocket, clients: TableRef[string, Client]) {.asy var id = "" var peerId = "" while true: - let line = await client.recvLine(maxLength = 400) + var line = await client.recvLine(maxLength = 400) + line = line.strip(leading = false, trailing = true, chars = {'\r', '\n'}) if line.len == 0: removeClient(clients, peerId) break