Skip to content

Commit 182f78c

Browse files
set relay path as backup
1 parent d601179 commit 182f78c

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

iroh/src/magicsock.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -468,16 +468,11 @@ impl MagicSock {
468468
let conn = conn.clone();
469469
let addr = addr.private_socket_addr();
470470
task::spawn(async move {
471-
match conn
472-
.open_path(addr, quinn_proto::PathStatus::Available)
473-
.await
474-
{
471+
match conn.open_path(addr, quinn_proto::PathStatus::Backup).await {
475472
Ok(path) => {
476-
path.set_max_idle_timeout(Some(
477-
ENDPOINTS_FRESH_ENOUGH_DURATION,
478-
))
479-
.ok();
480-
path.set_keep_alive_interval(Some(HEARTBEAT_INTERVAL)).ok();
473+
// Keep the relay path open
474+
path.set_max_idle_timeout(None).ok();
475+
path.set_keep_alive_interval(None).ok();
481476
}
482477
Err(err) => {
483478
warn!("failed to open path {:?}", err);

0 commit comments

Comments
 (0)