Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 socket.io 在我的应用程序中进行 websocket 通信。连接丢失后,它尝试重新连接 6 次,然后达到超时。当不再尝试重新连接时,是否有任何事件发出?
好吧,我发现这是一个已知问题。
参考:https ://github.com/LearnBoost/socket.io/issues/652
伤心... :(
从源代码看来,事件是“reconnect_failed”
if (this.attempts > this._reconnectionAttempts) { this.emit('reconnect_failed'); this.reconnecting = false; }