close socket if client has hung up
This commit is contained in:
parent
f50dada999
commit
6dff0847b3
|
@ -77,6 +77,7 @@ proc handleRequests(punchd: Punchd, userSock: AsyncSocket) {.async.} =
|
||||||
break
|
break
|
||||||
let line = await userSock.recvLine(maxLength = 400)
|
let line = await userSock.recvLine(maxLength = 400)
|
||||||
if line.len == 0:
|
if line.len == 0:
|
||||||
|
userSock.close()
|
||||||
break
|
break
|
||||||
asyncCheck punchd.handleRequest(line, userSock)
|
asyncCheck punchd.handleRequest(line, userSock)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue