close sock after sending to client
This commit is contained in:
parent
bec4c1b158
commit
87a8c44954
|
@ -64,6 +64,7 @@ proc handleRequest(punchd: Punchd, line: string,
|
||||||
|
|
||||||
let unixFd = unixSock.getFd.AsyncFD
|
let unixFd = unixSock.getFd.AsyncFD
|
||||||
await unixFd.asyncSendMsg(&"ok|{id}\n", @[fromFd(sock.getFd.AsyncFD)])
|
await unixFd.asyncSendMsg(&"ok|{id}\n", @[fromFd(sock.getFd.AsyncFD)])
|
||||||
|
sock.close()
|
||||||
|
|
||||||
except PunchHoleError as e:
|
except PunchHoleError as e:
|
||||||
await unixSock.send(&"error|{id}|{e.msg}\n")
|
await unixSock.send(&"error|{id}|{e.msg}\n")
|
||||||
|
|
Loading…
Reference in New Issue