chore(headless-client): fix typo in match statement (#5706)

PR #5700 had a typo in it. I didn't notice that these match arms use
`|`, so I accidentally flush the DNS for an event that doesn't need it.
Only `OnUpdateResources` should flush DNS.
This commit is contained in:
Reactor Scram
2024-07-05 03:16:33 +00:00
committed by GitHub
parent 29df4a2f1f
commit 7e9db1d876

View File

@@ -191,8 +191,8 @@ pub fn run_only_headless_client() -> Result<()> {
is_authentication_error: _,
}) => return Err(anyhow!(error_msg).context("Firezone disconnected")),
InternalServerMsg::Ipc(IpcServerMsg::Ok)
| InternalServerMsg::Ipc(IpcServerMsg::OnTunnelReady)
| InternalServerMsg::Ipc(IpcServerMsg::OnUpdateResources(_)) => {
| InternalServerMsg::Ipc(IpcServerMsg::OnTunnelReady) => {}
InternalServerMsg::Ipc(IpcServerMsg::OnUpdateResources(_)) => {
// On every resources update, flush DNS to mitigate <https://github.com/firezone/firezone/issues/5052>
dns_controller.flush()?;
}