Browse Source

1

origin/hotfix/hlk-flight
root 4 months ago
parent
commit
60bcf2bf24
  1. 5
      app/core/websocket/adapter.py

5
app/core/websocket/adapter.py

@ -90,7 +90,10 @@ class WebSocketAdapter:
if msg: if msg:
# 将消息数据序列化为JSON字符串 # 将消息数据序列化为JSON字符串
import json import json
if isinstance(msg.data, dict): if msg.data is None:
# 如果data为None,跳过发送
logger.debug(f"适配器跳过空数据消息: {self.outbound_channel.name} -> {msg.type}")
elif isinstance(msg.data, dict):
# 在发送时添加type字段 # 在发送时添加type字段
send_data = { send_data = {
"Type": msg.type, "Type": msg.type,

Loading…
Cancel
Save