Ensure `transp.reader` is reset to `nil` on error (#508)
In `stream.readLoop`, a finished `Future` was left in `transp.reader` if there was an error in `resumeRead`. Set it to `nil` as well. Co-authored-by: Jacek Sieka <jacek@status.im>
This commit is contained in:
parent
c5a5ece487
commit
17b7a76c7e
|
@ -2372,7 +2372,7 @@ template readLoop(name, body: untyped): untyped =
|
|||
# resumeRead() could not return any error.
|
||||
raiseOsDefect(errorCode, "readLoop(): Unable to resume reading")
|
||||
else:
|
||||
transp.reader.complete()
|
||||
transp.completeReader()
|
||||
if errorCode == oserrno.ESRCH:
|
||||
# ESRCH 3 "No such process"
|
||||
# This error could be happened on pipes only, when process which
|
||||
|
|
Loading…
Reference in New Issue