Skip to content

fix(android): drop session in a new thread - #9394

Merged
jamilbk merged 2 commits into
mainfrom
fix/android-drop-within-runtime
Jun 4, 2025
Merged

fix(android): drop session in a new thread#9394
jamilbk merged 2 commits into
mainfrom
fix/android-drop-within-runtime

Conversation

@thomaseizinger

Copy link
Copy Markdown
Member

When the Android app calls disconnect, it is still within the context of a connlib callback. That callback is executed within the runtime that we are trying to drop. That is not allowed and leads to a panic.

Resolves: #9390

@thomaseizinger
thomaseizinger requested review from Copilot and jamilbk June 4, 2025 09:06
@vercel

vercel Bot commented Jun 4, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
firezone ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 4, 2025 5:39pm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request addresses a runtime panic by dropping the session in a separate thread when disconnecting, ensuring that the session is not dropped within the same runtime context.

  • Drop session logic moved to a new thread
  • Ensures disconnect is executed outside runtime-triggered callbacks

Comment thread rust/android-client-ffi/src/lib.rs
@sentry

sentry Bot commented Jun 4, 2025

Copy link
Copy Markdown

Sentry Issue: ANDROID-CLIENT-J

@jamilbk
jamilbk added this pull request to the merge queue Jun 4, 2025
@jamilbk
jamilbk removed this pull request from the merge queue due to a manual request Jun 4, 2025
@jamilbk
jamilbk enabled auto-merge June 4, 2025 17:38
@jamilbk
jamilbk added this pull request to the merge queue Jun 4, 2025
Merged via the queue into main with commit 0e63093 Jun 4, 2025
@jamilbk
jamilbk deleted the fix/android-drop-within-runtime branch June 4, 2025 18:02
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.

panic: Cannot drop a runtime in a context where blocking is not allowed. This happens when a runtime is dropped from within an asynchronous context.

3 participants