Skip to content

Fix: Add missing .await for Veilid API shutdown in Android bridge#19

Merged
tripledoublev merged 1 commit intomainfrom
fix/await-veilid-api-shutdown
May 23, 2025
Merged

Fix: Add missing .await for Veilid API shutdown in Android bridge#19
tripledoublev merged 1 commit intomainfrom
fix/await-veilid-api-shutdown

Conversation

@tripledoublev
Copy link
Copy Markdown
Contributor

Description

This PR fixes a type mismatch error in the Android bridge where get_veilid_api() was being called without .await. The function is async and returns a Future<Option<VeilidAPI>>, but was being used as if it returned an Option<VeilidAPI> directly.

Changes

  • Added .await to backend.get_veilid_api() call in android_bridge.rs
  • This ensures proper async/await handling when shutting down the Veilid API

Fixes the following compilation error:


error[E0308]: mismatched types
--> src/android_bridge.rs:123:28
|
123 | if let Some(veilid_api) = backend.get_veilid_api() {
| ^^^^^^^^^^^^^^^^^^^^^^^^ expected future, found Option<_>

@tripledoublev tripledoublev merged commit 41e02ed into main May 23, 2025
@tripledoublev tripledoublev deleted the fix/await-veilid-api-shutdown branch May 23, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant