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:
Tanguy 2022-05-19 14:27:44 +02:00
parent edfbb169c8
commit 8927db93f6
No known key found for this signature in database
GPG Key ID: 7DD8EC6B6CE6C45E
1 changed files with 1 additions and 1 deletions

View File

@ -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