|
@@ -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)
|
|
|
|
|
|