Fix net.readLine infine loop #17534 (#17535)

* Fix net.readLine infine loop #17534

* fix #17534 add return to template
This commit is contained in:
ben
2021-03-29 10:24:15 +01:00
committed by GitHub
parent 085580a2c8
commit e45b1e3f36

View File

@@ -1535,6 +1535,7 @@ proc readLine*(socket: Socket, line: var string, timeout = -1,
if flags.isDisconnectionError(lastError):
setLen(line, 0)
socket.socketError(n, lastError = lastError, flags = flags)
return
var waited: Duration