mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
fix(rust/gui-client/auth): destroy the connlib session on disconnect (#6795)
Closes #6791 We weren't closing the connlib session immediately when we get `on_disconnect`, this patch fixes that. This passes the manual test established in #6792. I also cycled through sign-in, close, open, sign-out, and it looks fine. --------- Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
This commit is contained in:
@@ -375,14 +375,20 @@ impl<'a> Handler<'a> {
|
||||
ConnlibMsg::OnDisconnect {
|
||||
error_msg,
|
||||
is_authentication_error,
|
||||
} => self
|
||||
.ipc_tx
|
||||
.send(&ServerMsg::OnDisconnect {
|
||||
error_msg,
|
||||
is_authentication_error,
|
||||
})
|
||||
.await
|
||||
.context("Error while sending IPC message `OnDisconnect`")?,
|
||||
} => {
|
||||
if let Some(session) = self.session.take() {
|
||||
// Identical to dropping, but looks nicer
|
||||
session.connlib.disconnect();
|
||||
}
|
||||
self.dns_controller.deactivate()?;
|
||||
self.ipc_tx
|
||||
.send(&ServerMsg::OnDisconnect {
|
||||
error_msg,
|
||||
is_authentication_error,
|
||||
})
|
||||
.await
|
||||
.context("Error while sending IPC message `OnDisconnect`")?
|
||||
}
|
||||
ConnlibMsg::OnSetInterfaceConfig { ipv4, ipv6, dns } => {
|
||||
self.tun_device.set_ips(ipv4, ipv6).await?;
|
||||
self.dns_controller.set_dns(dns).await?;
|
||||
|
||||
@@ -19,6 +19,9 @@ export default function GUI({ title }: { title: string }) {
|
||||
<ChangeItem enable={title === "Linux GUI"} pull="6780">
|
||||
Fixes a bug where the Linux Clients didn't work on ZFS filesystems
|
||||
</ChangeItem>
|
||||
<ChangeItem pull="6795">
|
||||
Fixes a bug where auto-sign-in with an expired token would cause a "Couldn't send Disconnect" error message.
|
||||
</ChangeItem>
|
||||
</ul>
|
||||
</Entry
|
||||
*/}
|
||||
|
||||
Reference in New Issue
Block a user