add eof and closed handling

This commit is contained in:
Dmitriy Ryajov 2020-05-11 22:27:54 -06:00
parent e876a16062
commit 8ca1027ef9
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4

View File

@ -167,6 +167,9 @@ method pushTo*(s: BufferStream, data: seq[byte]) {.base, async.} =
## is preserved. ## is preserved.
## ##
if s.atEof:
raise newLPStreamEOFError()
if s.atEof: if s.atEof:
raise newLPStreamEOFError() raise newLPStreamEOFError()