diff --git a/examples/app/app.nim b/examples/app/app.nim index e11dc52..d7d6e46 100644 --- a/examples/app/app.nim +++ b/examples/app/app.nim @@ -75,7 +75,8 @@ proc handlePunchdMessages(connection: PunchdConnection) {.async.} = while true: let fd = connection.sock.getFd.AsyncFD let resp = await fd.asyncRecvMsg(size = 400, cmsgSize = sizeof(AsyncFD)) - let args = resp.data.parseArgs(3, 1) + let line = resp.data.strip(leading = false, trailing = true, chars = {'\n'}) + let args = line.parseArgs(3, 1) case args[0]: of "ok": let outMsg = connection.outMessages[args[1]]