This commit is contained in:
Tanguy 2023-05-25 11:51:38 +02:00
parent 2c50fce3dc
commit 80c3f94945
No known key found for this signature in database
GPG Key ID: 7DD8EC6B6CE6C45E

View File

@ -78,6 +78,8 @@ method readOnce*(
s: WsStream,
pbytes: pointer,
nbytes: int): Future[int] {.async.} =
if s.atEof:
raise newLPStreamEOFError()
let res = mapExceptions(await s.session.recv(pbytes, nbytes))
if res == 0 and s.session.readyState == ReadyState.Closed: