should not handle transport exceptions

This commit is contained in:
Dmitriy Ryajov 2019-09-25 12:42:52 -06:00
parent 99869aa8b8
commit dd3f85965b

View File

@ -62,9 +62,9 @@ method readUntil*(s: ChronosStream,
sep: seq[byte]): Future[int] {.async, gcsafe.} = sep: seq[byte]): Future[int] {.async, gcsafe.} =
try: try:
result = await s.reader.readUntil(pbytes, nbytes, sep) result = await s.reader.readUntil(pbytes, nbytes, sep)
except TransportIncompleteError, AsyncStreamIncompleteError: except AsyncStreamIncompleteError:
raise newLPStreamIncompleteError() raise newLPStreamIncompleteError()
except TransportLimitError, AsyncStreamLimitError: except AsyncStreamLimitError:
raise newLPStreamLimitError() raise newLPStreamLimitError()
except LPStreamReadError as exc: except LPStreamReadError as exc:
raise newLPStreamReadError(exc.par) raise newLPStreamReadError(exc.par)