回复Pong消息
This commit is contained in:
@@ -1495,6 +1495,13 @@ async fn run_updater(debug_mode: bool) -> bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 回复 pong 心跳响应
|
||||||
|
if msg_type == "ping" {
|
||||||
|
let pong_str = format!(r#"{{"Type":"pong","Data":{{"timestamp":"{}"}}}}"#, ts);
|
||||||
|
log_print!("{} 发送消息:{}", ts, pong_str);
|
||||||
|
sender.send(pong_str);
|
||||||
|
}
|
||||||
|
|
||||||
// 处理 FileVer 响应(根据当前阶段分发)
|
// 处理 FileVer 响应(根据当前阶段分发)
|
||||||
if msg_type == "FileVer" {
|
if msg_type == "FileVer" {
|
||||||
if let Some(file_versions) = data.get("Data").and_then(|d| d.get("file_versions")).and_then(|v| v.as_object()) {
|
if let Some(file_versions) = data.get("Data").and_then(|d| d.get("file_versions")).and_then(|v| v.as_object()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user