shorter punch
This commit is contained in:
parent
cb640e48c5
commit
12390a66e8
@ -379,10 +379,9 @@ impl RendezvousMediator {
|
|||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
let local_addr = socket.local_addr();
|
let local_addr = socket.local_addr();
|
||||||
// key important here for punch hole to tell gateway incoming peer is safe.
|
// key important here for punch hole to tell my gateway incoming peer is safe.
|
||||||
// before we use 300ms, 1000ms seems more safe.
|
|
||||||
// it can not be async here, because local_addr can not be reused, we must close the connection before use it again.
|
// it can not be async here, because local_addr can not be reused, we must close the connection before use it again.
|
||||||
allow_err!(socket_client::connect_tcp(peer_addr, local_addr, 1000).await);
|
allow_err!(socket_client::connect_tcp(peer_addr, local_addr, 30).await);
|
||||||
socket
|
socket
|
||||||
};
|
};
|
||||||
let mut msg_out = Message::new();
|
let mut msg_out = Message::new();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user