zhou.xiaoning 2 years ago
parent
commit
4ca8bf7a9c
1 changed files with 6 additions and 6 deletions
  1. 6 6
      client/client.go

+ 6 - 6
client/client.go

@@ -150,9 +150,9 @@ func (r *Client) SetQuoteWebSocket(ws *websocket.Conn) (err error) {
 	r.mtx.Lock()
 	r.mtx.Lock()
 	defer r.mtx.Unlock()
 	defer r.mtx.Unlock()
 
 
-	if r.wsQuoteConn != nil {
-		r.wsQuoteConn.Close()
-	}
+	// if r.wsQuoteConn != nil {
+	// 	r.wsQuoteConn.Close()
+	// }
 	r.wsQuoteConn = ws
 	r.wsQuoteConn = ws
 	r.quoteWriteChan = make(chan []byte, 100)
 	r.quoteWriteChan = make(chan []byte, 100)
 
 
@@ -259,9 +259,9 @@ func (r *Client) SetTradeWebSocket(ws *websocket.Conn) (err error) {
 	r.mtx.Lock()
 	r.mtx.Lock()
 	defer r.mtx.Unlock()
 	defer r.mtx.Unlock()
 
 
-	if r.wsTradeConn != nil {
-		r.wsTradeConn.Close()
-	}
+	// if r.wsTradeConn != nil {
+	// 	r.wsTradeConn.Close()
+	// }
 	r.wsTradeConn = ws
 	r.wsTradeConn = ws
 	r.tradeWriteChan = make(chan []byte, 100)
 	r.tradeWriteChan = make(chan []byte, 100)