Closed steadicat closed 13 years ago
What's your code using WebSocket look like? It may happen when you call method of WebSocket inside WebSocket callback such as ws.onmessage. In that case, as the error message suggests, calling such method using setTimeout such as setTimeout(function() { ws.send(...); }, 1); may work as workaround. It would be better if it works without such workaround, though...
We got the same error message in firefox when do the load test. In this case, when server send 1 message/10ms, firefox hang with this message. When server send 1ms/second everything seems fine. Note : Chrome works perfectly with all case :(
The server code (build on jetty) : while (true) { DirectControler.broadcast(dummy_message); try { Thread.currentThread().sleep(10); } catch (InterruptedException e) { System.out.print(e); } } The client code (this.socket is an instant of your flash web socket): this.socket.onmessage = function(message) { console.log("new message " + message.data);
};
This may be fixed by this change: https://github.com/gimite/web-socket-js/commit/20f837425d44144f0df7020a5f98350be2b83745
Assuming this is fixed. Please reopen if it's still reproduced.
We've been getting reports of users seeing this error in Firefox:
"Error: You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround."