@@ -88,7 +88,11 @@ function heartbeat() {
export function closeWsWithoutReconnect() {
shouldReconnect = false;
- ws.close();
+ try {
+ if (ws && ws.readyState === 1) ws.close();
+ } catch (e) {
+ console.log("关闭ws异常。");
+ }
}
export function getQRCode(order) {