zhou.xiaoning 2 年之前
父節點
當前提交
ef73b67f5e
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      client/client.go

+ 7 - 1
client/client.go

@@ -95,9 +95,15 @@ func (r *Client) WriteQuoteWsBuf(buf []byte) (err error) {
 }
 
 func (r *Client) WriteTradeWsBuf(buf []byte) (err error) {
-	if r.wsTradeConn != nil {
+	if r.tradeWriteChan != nil {
 		r.tradeWriteChan <- buf
 	} else {
+		global.M2A_LOG.Info("WriteTradeWsBuf::tradeWriteChan == nil", zap.Any("LoginID", r.LoginID), zap.Any("SessionID", r.SessionID))
+	}
+
+	if r.wsTradeConn != nil {
+		// r.tradeWriteChan <- buf
+	} else {
 		global.M2A_LOG.Info("WriteTradeWsBuf::wsTradeConn == nil", zap.Any("LoginID", r.LoginID), zap.Any("SessionID", r.SessionID))
 		global.M2A_LOG.Info("当前所有Client----")
 		for _, item := range Clients {