diff options
| author | Emīls <emils@mullvad.net> | 2024-06-04 14:28:28 +0200 |
|---|---|---|
| committer | Bug Magnet <marco.nikic@mullvad.net> | 2024-06-17 13:22:25 +0200 |
| commit | 72ccf7931ae22948cb85f147531aaf5528b448ae (patch) | |
| tree | c1f666e9f00a8cefe7775737672c66a38649c3d5 | |
| parent | 4b4c9cc89f97dc3cb5fc93305250b2a8d2b42cb3 (diff) | |
| download | mullvadvpn-72ccf7931ae22948cb85f147531aaf5528b448ae.tar.xz mullvadvpn-72ccf7931ae22948cb85f147531aaf5528b448ae.zip | |
Add a timeout when exchanging post quantum keys
| -rw-r--r-- | talpid-tunnel-config-client/src/ios_ffi/ios_runtime.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/talpid-tunnel-config-client/src/ios_ffi/ios_runtime.rs b/talpid-tunnel-config-client/src/ios_ffi/ios_runtime.rs index 37fdb0d16d..2989b4fb48 100644 --- a/talpid-tunnel-config-client/src/ios_ffi/ios_runtime.rs +++ b/talpid-tunnel-config-client/src/ios_ffi/ios_runtime.rs @@ -158,6 +158,11 @@ impl IOSRuntime { } } + _ = tokio::time::sleep(std::time::Duration::from_secs(5)) => { + unsafe { swift_post_quantum_key_ready(packet_tunnel_ptr, ptr::null(), ptr::null()); } + shutdown_handle.shutdown() + } + _ = cancel_token_rx.recv() => { shutdown_handle.shutdown() // The swift runtime pre emptively cancelled the key exchange, nothing to do here. |
