diff --git a/rust/connlib/tunnel/src/io.rs b/rust/connlib/tunnel/src/io.rs
index c86f3cc67..fcd54cfe4 100644
--- a/rust/connlib/tunnel/src/io.rs
+++ b/rust/connlib/tunnel/src/io.rs
@@ -145,7 +145,7 @@ impl Io {
if let Some(timeout) = self.timeout.as_mut() {
if timeout.poll_unpin(cx).is_ready() {
let deadline = timeout.deadline().into();
- self.timeout.as_mut().take(); // Clear the timeout.
+ self.timeout = None; // Clear the timeout.
return Poll::Ready(Ok(Input::Timeout(deadline)));
}
@@ -421,6 +421,11 @@ fn is_max_wg_packet_size(d: &DatagramIn) -> bool {
#[cfg(test)]
mod tests {
+ use std::future::poll_fn;
+
+ use domain::base::scan::ScannerError;
+ use futures::task::noop_waker_ref;
+
use super::*;
#[test]
@@ -430,4 +435,36 @@ mod tests {
assert_eq!(max_channel_size, 1_360_000); // 1.36MB is fine, we only have 2 of these channels, meaning less than 3MB additional buffer in total.
}
+
+ #[tokio::test]
+ async fn timer_is_reset_after_it_fires() {
+ let now = Instant::now();
+
+ let mut io = Io::new(
+ Arc::new(|_| Err(io::Error::custom("not implemented"))),
+ Arc::new(|_| Err(io::Error::custom("not implemented"))),
+ );
+
+ io.reset_timeout(now + Duration::from_secs(1));
+
+ let poll_fn = poll_fn(|cx| io.poll(cx, &mut [], &mut [], &EncryptBuffer::new()))
+ .await
+ .unwrap();
+
+ let Input::Timeout(timeout) = poll_fn else {
+ panic!("Unexpected result");
+ };
+
+ assert_eq!(timeout, now + Duration::from_secs(1));
+
+ let poll = io.poll(
+ &mut Context::from_waker(noop_waker_ref()),
+ &mut [],
+ &mut [],
+ &EncryptBuffer::new(),
+ );
+
+ assert!(poll.is_pending());
+ assert!(io.timeout.is_none());
+ }
}
diff --git a/website/src/components/Changelog/Android.tsx b/website/src/components/Changelog/Android.tsx
index 743d21db1..07620a7ac 100644
--- a/website/src/components/Changelog/Android.tsx
+++ b/website/src/components/Changelog/Android.tsx
@@ -18,6 +18,10 @@ export default function Android() {
Prevents re-connections to the portal from hanging for longer than 5s.
+
+ Fixes an issue where network roaming would cause Firezone to become
+ unresponsive.
+
Handles DNS queries over TCP correctly.
diff --git a/website/src/components/Changelog/Apple.tsx b/website/src/components/Changelog/Apple.tsx
index 41836cc61..86ab906af 100644
--- a/website/src/components/Changelog/Apple.tsx
+++ b/website/src/components/Changelog/Apple.tsx
@@ -19,6 +19,10 @@ export default function Apple() {
Prevents re-connections to the portal from hanging for longer than 5s.
+
+ Fixes an issue where network roaming would cause Firezone to become
+ unresponsive.
+
Handles DNS queries over TCP correctly.
diff --git a/website/src/components/Changelog/GUI.tsx b/website/src/components/Changelog/GUI.tsx
index cc53a210a..a07dab0ae 100644
--- a/website/src/components/Changelog/GUI.tsx
+++ b/website/src/components/Changelog/GUI.tsx
@@ -14,7 +14,12 @@ export default function GUI({ title }: { title: string }) {
return (
{/* When you cut a release, remove any solved issues from the "known issues" lists over in `client-apps`. This must not be done when the issue's PR merges. */}
-
+
+
+ Fixes an issue where network roaming would cause Firezone to become
+ unresponsive.
+
+
Mitigates a crash in case the maximum packet size is not respected.
diff --git a/website/src/components/Changelog/Headless.tsx b/website/src/components/Changelog/Headless.tsx
index 46f7aaa3e..5042cbed2 100644
--- a/website/src/components/Changelog/Headless.tsx
+++ b/website/src/components/Changelog/Headless.tsx
@@ -18,9 +18,13 @@ export default function Headless() {
Prevents re-connections to the portal from hanging for longer than 5s.
+
+ Fixes an issue where network roaming would cause Firezone to become
+ unresponsive.
+
- Fixes an issue where subsequent SIGHUP signals after the first one were
- ignored.
+ Fixes an issue where subsequent SIGHUP signals after the first one
+ were ignored.