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
commit e45b1e3f36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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