must strip newline from punchd message
This commit is contained in:
parent
3f9cb6a3b1
commit
41048dd8cd
|
@ -75,7 +75,8 @@ proc handlePunchdMessages(connection: PunchdConnection) {.async.} =
|
||||||
while true:
|
while true:
|
||||||
let fd = connection.sock.getFd.AsyncFD
|
let fd = connection.sock.getFd.AsyncFD
|
||||||
let resp = await fd.asyncRecvMsg(size = 400, cmsgSize = sizeof(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]:
|
case args[0]:
|
||||||
of "ok":
|
of "ok":
|
||||||
let outMsg = connection.outMessages[args[1]]
|
let outMsg = connection.outMessages[args[1]]
|
||||||
|
|
Loading…
Reference in New Issue