瀏覽代碼

Отладка

Book Pauk 4 年之前
父節點
當前提交
5e8b2e1c87
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      client/api/webSocketConnection.js

+ 2 - 0
client/api/webSocketConnection.js

@@ -64,6 +64,7 @@ class WebSocketConnection {
 
 
                 url = url || `${protocol}//${window.location.host}/ws`;
                 url = url || `${protocol}//${window.location.host}/ws`;
                 
                 
+console.log('new connection');
                 this.ws = new WebSocket(url);
                 this.ws = new WebSocket(url);
 
 
                 if (this.timer) {
                 if (this.timer) {
@@ -73,6 +74,7 @@ class WebSocketConnection {
 
 
                 let resolved = false;
                 let resolved = false;
                 this.ws.onopen = (e) => {
                 this.ws.onopen = (e) => {
+console.log(this.ws.readyState);
                     resolved = true;
                     resolved = true;
                     resolve(e);
                     resolve(e);
                 };
                 };