[mio] 修复指定通道类型无效的问题

This commit is contained in:
lubeilin
2024-03-02 14:03:19 +08:00
parent b6aba36510
commit e3f328cc9b
5 changed files with 25 additions and 26 deletions
+3 -1
View File
@@ -151,7 +151,9 @@ pub fn base_handle(
client_cipher.encrypt_ipv4(&mut net_packet)?;
//优先发到直连到地址
if context.send_by_id(net_packet.buffer(), &dest_ip).is_err() {
context.send_default(net_packet.buffer(), current_device.connect_server)?;
if !context.use_channel_type().is_only_p2p() {
context.send_default(net_packet.buffer(), current_device.connect_server)?;
}
}
return Ok(());
}