@wendongfly/myhi 1.0.77 → 1.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat.html +3 -2
- package/package.json +1 -1
package/dist/chat.html
CHANGED
|
@@ -976,8 +976,9 @@
|
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
978
|
|
|
979
|
-
|
|
980
|
-
socket.on('
|
|
979
|
+
let _reconnectFails = 0;
|
|
980
|
+
socket.on('connect', () => { _reconnectFails = 0; showOverlay('正在加入会话...'); socket.emit('join', SESSION_ID); });
|
|
981
|
+
socket.on('connect_error', () => { _reconnectFails++; showOverlay(_reconnectFails >= 5 ? '连接失败,请检查网络' : `正在重连... (${_reconnectFails})`, _reconnectFails >= 10); });
|
|
981
982
|
socket.on('disconnect', () => { showOverlay('已断开连接,正在重连...'); });
|
|
982
983
|
|
|
983
984
|
socket.on('joined', (session) => {
|