From 87a8c44954d406f389fb377c4628f9966ff4d25f Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Wed, 7 Oct 2020 00:31:04 +0200 Subject: [PATCH] close sock after sending to client --- punchd.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/punchd.nim b/punchd.nim index c6842ee..91afb0d 100644 --- a/punchd.nim +++ b/punchd.nim @@ -64,6 +64,7 @@ proc handleRequest(punchd: Punchd, line: string, let unixFd = unixSock.getFd.AsyncFD await unixFd.asyncSendMsg(&"ok|{id}\n", @[fromFd(sock.getFd.AsyncFD)]) + sock.close() except PunchHoleError as e: await unixSock.send(&"error|{id}|{e.msg}\n")