Closed iacore closed 3 weeks ago
Hmm. WebSockets are added to the sockets list only when they are open, and removed on close (See code here)
So perhaps a socket is closed and, before being removed of the sockets list, the send method is invoked.
Can you try changing this line adding an if
to check if the socket is already open?
Version
v2.2.1
Platform
Linux
What steps will reproduce the bug?
deno task serve
How often does it reproduce? Is there a required condition?
the crash is probabilistic. the faster you do the sequence of actions, the more likely that deno will crash.
What is the expected behavior?
No crash
What do you see instead?
Additional information
seems to be a race condition