From 9b0d63687fea5f9ced5310ed2dcbc180b728aaad Mon Sep 17 00:00:00 2001 From: Sebastian Holmin Date: Thu, 18 Jul 2024 12:35:54 +0200 Subject: [PATCH 1/2] Fix burst daemon events being missed The daemon event stream was reset between every item, which caused events that arrive while the previous item is being handled to be missed. --- mullvad-cli/src/cmds/status.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mullvad-cli/src/cmds/status.rs b/mullvad-cli/src/cmds/status.rs index 8880c4c69c85..939beeca4ac7 100644 --- a/mullvad-cli/src/cmds/status.rs +++ b/mullvad-cli/src/cmds/status.rs @@ -27,7 +27,8 @@ impl Status { pub async fn listen(mut rpc: MullvadProxyClient, args: StatusArgs) -> Result<()> { let mut previous_tunnel_state = None; - while let Some(event) = rpc.events_listen().await?.next().await { + let mut event_stream = rpc.events_listen().await?; + while let Some(event) = event_stream.next().await { match event? { DaemonEvent::TunnelState(new_state) => { if args.debug { From 860ad9704778e0d3656b54d4b53534b7a2708da7 Mon Sep 17 00:00:00 2001 From: Sebastian Holmin Date: Thu, 18 Jul 2024 12:59:41 +0200 Subject: [PATCH 2/2] Add fix to changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1a0956b7257..35190b4ce1b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,9 @@ Line wrap the file at 100 chars. Th - Update Electron from 28.1.3 to 30.0.4. ### Fixed +- Fix mullvad cli bug causing `mullvad status listen` command to miss events if they occurred + too quickly. + #### Windows - Fix race condition that could result in crashes when DAITA was enabled during disconnects.