How could I know all ws connections were actually closed? #1120
Answered
by
ghost
pengweichu
asked this question in
Q&A
-
Below is my code, since the loop->defer is async, after I called removeAllClients, how can I determine all clients are actually closed? Thanks
|
Beta Was this translation helpful? Give feedback.
Answered by
ghost
Nov 9, 2020
Replies: 1 comment
-
You can read the docs; https://unetworking.github.io/uWebSockets.js/generated/interfaces/websocket.html#close That code is very inefficient as you're making one defer per socket rather than one defer in total. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can read the docs; https://unetworking.github.io/uWebSockets.js/generated/interfaces/websocket.html#close
That code is very inefficient as you're making one defer per socket rather than one defer in total.