From 6dff0847b341d5696c3e9bc9cde8281037c25f9b Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Sat, 10 Oct 2020 11:14:31 +0200 Subject: [PATCH] close socket if client has hung up --- punchd.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/punchd.nim b/punchd.nim index 91afb0d..5271112 100644 --- a/punchd.nim +++ b/punchd.nim @@ -77,6 +77,7 @@ proc handleRequests(punchd: Punchd, userSock: AsyncSocket) {.async.} = break let line = await userSock.recvLine(maxLength = 400) if line.len == 0: + userSock.close() break asyncCheck punchd.handleRequest(line, userSock)