Administrator
2023-08-22 01fd0dc91fbb9defcd5aa90635754befdc71dfd1
outside_api_command_manager.py
@@ -11,6 +11,7 @@
# 心跳信息
from huaxin_client import socket_util
from huaxin_client.client_network import SendResponseSkManager
from log_module.log import logger_debug
from utils import middle_api_protocol
MSG_TYPE_HEART = "heart"
@@ -206,8 +207,8 @@
    def __heart_beats(cls, _type, client_id, sk):
        while True:
            try:
                sk.send(SendResponseSkManager.format_response(
                    json.dumps({"type": "heart", "client_id": client_id}).encode('utf-8')))
                sk.send(socket_util.load_header(json.dumps({"type": "heart", "client_id": client_id}).encode('utf-8')))
                logger_debug.debug("心跳信息发送:{}",client_id)
                # print("心跳信息发送成功", client_id)
            except Exception as e:
                logging.error("错误")