additional comments

This commit is contained in:
Dmitriy Ryajov 2020-06-01 17:19:53 -06:00
parent bb4635a2d7
commit 3ddc4bbebd
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4

View File

@ -127,6 +127,8 @@ proc newChannel*(id: uint64,
name = result.name
proc closeMessage(s: LPChannel) {.async.} =
## send close message - this will not raise
## on EOF or Closed
withEOFExceptions:
withWriteLock(s.writeLock):
trace "sending close message", id = s.id,
@ -137,6 +139,7 @@ proc closeMessage(s: LPChannel) {.async.} =
await s.conn.writeMsg(s.id, s.closeCode) # write close
proc resetMessage(s: LPChannel) {.async.} =
## send reset message - this will not raise
withEOFExceptions:
withWriteLock(s.writeLock):
trace "sending reset message", id = s.id,