diff --git a/rust/gui-client/src-common/src/controller.rs b/rust/gui-client/src-common/src/controller.rs index 282f117db..2f0543cf1 100644 --- a/rust/gui-client/src-common/src/controller.rs +++ b/rust/gui-client/src-common/src/controller.rs @@ -598,21 +598,17 @@ impl<'a, I: GuiIntegration> Controller<'a, I> { Err(Error::IpcServiceTerminating)? } IpcServerMsg::TunnelReady => { - if self.auth.session().is_none() { - // This could maybe happen if the user cancels the sign-in - // before it completes. This is because the state machine - // between the GUI, the IPC service, and connlib isn't perfectly synced. - tracing::error!("Got `TunnelReady` while signed out"); + let Status::WaitingForTunnel { start_instant } = self.status else { + // If we are not waiting for a tunnel, continue. return Ok(ControlFlow::Continue(())); - } - if let Status::WaitingForTunnel { start_instant } = self.status { - tracing::info!(elapsed = ?start_instant.elapsed(), "Tunnel ready"); - self.status = Status::TunnelReady { resources: vec![] }; - self.integration.show_notification( - "Firezone connected", - "You are now signed in and able to access resources.", - )?; - } + }; + + tracing::info!(elapsed = ?start_instant.elapsed(), "Tunnel ready"); + self.status = Status::TunnelReady { resources: vec![] }; + self.integration.show_notification( + "Firezone connected", + "You are now signed in and able to access resources.", + )?; self.refresh_system_tray_menu(); } }