Open bryaan opened 1 year ago
The fix for now seems to be adding a reentrantlock and doing something like this:
try
msg = deepcopy(msg) # So we dont modify concurrently
@async begin
lock(ws.lock) do
send(ws.client, JSON3.write(msg))
end
end
catch
end
It would be very nice if the lib did this internally. Any issues with that?
This would be great to get done
I find myself wanting to use
@async send(ws, msg)
because its possible for the send to wait forever. But it is causing the error below. Without fixing this all websocket servers using this lib are broken.│ HTTP.WebSockets.WebSocketError(HTTP.WebSockets.CloseFrameBody(1007, "Invalid UTF-8"))