Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions noq-proto/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2491,6 +2491,26 @@ impl Connection {
self.close_path_inner(now, path_id, PathAbandonReason::TimedOut)
{
warn!(?err, "failed closing path");
// The path could not be abandoned because it is the last
// remaining open path. Re-arm the idle timer so the close is
// retried once another path becomes available. Without this the
// timed-out path would be stuck forever: it can never be
// abandoned locally, and its keep-alive timer would keep the
// connection active indefinitely.
if matches!(err, ClosePathError::LastOpenPath)
&& let Some(timeout) =
self.path_data(path_id).idle_timeout
{
let dt = cmp::max(
timeout,
3 * self.pto(SpaceKind::Data, path_id),
);
self.timers.set(
Timer::PerPath(path_id, PathTimer::PathIdle),
now + dt,
self.qlog.with_time(now),
);
}
}
}

Expand Down
Loading
Loading