我正在使用JavaScript和联盟平台我将如何诊断此问题?非常感谢。
I'm using JavaScript and the Union platform How would I go about diagnosing this problem? Many thanks.
推荐答案如果你去 jsbin/ekusep/6/edit 并查看JavaScript控制台,您将看到在建立连接之前WebSocket已关闭已记录。我在Chrome中对此进行了测试。
If you go to jsbin/ekusep/6/edit and view the JavaScript console you'll see the 'WebSocket is closed before the connection is established' logged. I've tested this in Chrome.
在此代码中,含义是 ws.close()是在连接被提供机会之前调用(通过用户代码)。
In this code what it means is that ws.close() was called (by user code) before the connection was even given a chance to be established.
因此,此错误的原因是代码尝试关闭WebSocket连接之前它有机会实际连接。
So, the cause of this error is if code attempts to close the WebSocket connection before it's had a chance to actually connect.
更多推荐
在建立连接之前“WebSocket是关闭的”是什么意思?
发布评论