mirror of
https://mirror.suhoan.cn/https://github.com/EasyTier/EasyTier.git
synced 2025-12-15 14:17:24 +08:00
Add is_hole_punched flag to PeerConn (#1001)
This commit is contained in:
@@ -186,7 +186,7 @@ impl DirectConnectorManagerData {
|
||||
.await?;
|
||||
|
||||
// NOTICE: must add as directly connected tunnel
|
||||
self.peer_manager.add_direct_tunnel(ret).await
|
||||
self.peer_manager.add_client_tunnel(ret, true).await
|
||||
}
|
||||
|
||||
async fn do_try_connect_to_ip(&self, dst_peer_id: PeerId, addr: String) -> Result<(), Error> {
|
||||
|
||||
@@ -221,7 +221,7 @@ impl UdpHoePunchConnectorData {
|
||||
Ok(Some(tunnel)) => {
|
||||
tracing::info!(?tunnel, "hole punching get tunnel success");
|
||||
|
||||
if let Err(e) = self.peer_mgr.add_client_tunnel(tunnel).await {
|
||||
if let Err(e) = self.peer_mgr.add_client_tunnel(tunnel, false).await {
|
||||
tracing::warn!(?e, "add client tunnel failed");
|
||||
op(true);
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user