exceptions and resource cleanup

This commit is contained in:
Dmitriy Ryajov 2020-05-23 10:50:05 -06:00
parent ea2092580a
commit 04a802a995
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4

View File

@ -193,6 +193,9 @@ method reset*(s: LPChannel) {.base, async, gcsafe.} =
# might be dead already - reset is always # might be dead already - reset is always
# optimistic # optimistic
asyncCheck s.resetMessage() asyncCheck s.resetMessage()
# # because of the async check above,
# # give the message time to depart
# await sleepAsync(100.millis)
await procCall BufferStream(s).close() await procCall BufferStream(s).close()
s.isEof = true s.isEof = true
s.closedLocal = true s.closedLocal = true