Read frames instead of messages on close
Since #109, there can be only one concurrent user of recvMsg. So in case someone is already reading, better to readFrames
This commit is contained in:
parent
edfbb169c8
commit
8927db93f6
|
@ -455,6 +455,6 @@ proc close*(
|
|||
|
||||
# read frames until closed
|
||||
while ws.readyState != ReadyState.Closed:
|
||||
discard await ws.recvMsg()
|
||||
discard await ws.readFrame()
|
||||
except CatchableError as exc:
|
||||
trace "Exception closing", exc = exc.msg
|
||||
|
|
Loading…
Reference in New Issue