Skip to content
Merged
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
8 changes: 4 additions & 4 deletions cmux-tui/crates/cmux-remote/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -779,10 +779,10 @@ impl ClientConnection {
biased;
_ = close_state.changed() => return Err(ConnectionError::Closed),
next = async {
if let Some(deadline) = recovery_deadline {
if tokio::time::Instant::now() >= deadline {
return None;
}
if let Some(deadline) = recovery_deadline
&& tokio::time::Instant::now() >= deadline
{
return None;
}
let timeout = recovery_deadline
.map(|deadline| self.config.reconnect.attempt_timeout.min(deadline.saturating_duration_since(tokio::time::Instant::now())))
Expand Down
8 changes: 8 additions & 0 deletions cmux-tui/crates/cmux-terminal-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2587,6 +2587,14 @@ pub unsafe extern "C" fn cmux_wireguard_net_start(

/// Checks whether a trusted-carrier route is a literal WebSocket IP covered
/// by the tunnel's AllowedIPs without opening a connection.
///
/// # Safety
///
/// The caller must pass pointers that are valid for reads for the duration of
/// this call, or null where the API permits it. A non-null `route` must point
/// to a NUL-terminated C string, including its terminator, within one readable
/// allocation for the duration of the call. The output buffer must be valid
/// for writes of up to `error_capacity` bytes when an error is reported.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn cmux_wireguard_net_route_is_allowed(
net: *const CmuxWireGuardNet,
Expand Down
3 changes: 3 additions & 0 deletions cmux-tui/crates/cmux-tui/src/remote_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5233,6 +5233,7 @@ mod tests {
heartbeat_interval: None,
heartbeat_timeout: Duration::from_secs(1),
maximum_attempts: None,
maximum_duration: None,
},
startup_timeout: instrumented_test_timeout(Duration::from_secs(5)),
state_dir: directory.path().join("client"),
Expand Down Expand Up @@ -5396,6 +5397,7 @@ mod tests {
heartbeat_interval: None,
heartbeat_timeout: Duration::from_secs(1),
maximum_attempts: Some(2),
maximum_duration: None,
},
startup_timeout: Duration::from_secs(2),
state_dir: directory.path().join("client"),
Expand Down Expand Up @@ -5471,6 +5473,7 @@ mod tests {
heartbeat_interval: None,
heartbeat_timeout: Duration::from_secs(1),
maximum_attempts: Some(2),
maximum_duration: None,
},
startup_timeout: Duration::from_secs(1),
state_dir: directory.path().join("client"),
Expand Down
Loading