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