additional comments

This commit is contained in:
Dmitriy Ryajov 2020-06-01 17:19:53 -06:00
parent abbb50ae34
commit c7298f34f4
1 changed files with 3 additions and 0 deletions

View File

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