|
@@ -88,11 +88,12 @@ func sendRequestAndAwaitResponse(ws *websocket.Conn) ([]byte, error) {
|
|
c_log.GlobalLogger.Error("保持websocket连接活跃,解析requestJSON - 失败。", err)
|
|
c_log.GlobalLogger.Error("保持websocket连接活跃,解析requestJSON - 失败。", err)
|
|
}
|
|
}
|
|
|
|
|
|
- err = WsConn.WriteMessage(websocket.TextMessage, requestJSON)
|
|
|
|
|
|
+ err = ws.WriteMessage(websocket.TextMessage, requestJSON)
|
|
if err != nil {
|
|
if err != nil {
|
|
c_log.GlobalLogger.Error("保持websocket连接活跃,发送心跳请求 - 失败。", err)
|
|
c_log.GlobalLogger.Error("保持websocket连接活跃,发送心跳请求 - 失败。", err)
|
|
|
|
+ return nil, fmt.Errorf("发送心跳请求 - 失败。")
|
|
}
|
|
}
|
|
- c_log.GlobalLogger.Error("保持websocket连接活跃,发送心跳请求 - 成功。", err)
|
|
|
|
|
|
+ c_log.GlobalLogger.Info("保持websocket连接活跃,发送心跳请求 - 成功。", err)
|
|
|
|
|
|
// 使用channel等待响应
|
|
// 使用channel等待响应
|
|
responseChan := make(chan []byte)
|
|
responseChan := make(chan []byte)
|