Skip to content

Close the iroh endpoint gracefully on mobile stop and release 0.0.42 - #56

Merged
andrewchen5678 merged 2 commits into
mainfrom
android-graceful-stop
Aug 21, 2026
Merged

andrewchen5678 merged 2 commits into
mainfrom
android-graceful-stop

Conversation

@andrewchen5678

@andrewchen5678 andrewchen5678 commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • EzvpnHandle::stop (mobile FFI) now closes the iroh endpoint gracefully on a short-lived teardown thread (3 s cap, timeout built inside the runtime context) instead of just dropping the runtime. Previously nothing went on the wire, so the server only freed the client's address lease at the 30 s QUIC idle timeout; now it logs the disconnect immediately.
  • Note in build-android.sh and docs/Android-App.md that development/testing happens on the arm64 Android VM and the physical device only receives the signed release APK.
  • Bump version to 0.0.42 for the release.

Test plan

  • cargo clippy, cargo ndk -t arm64-v8a --platform 29 clippy --lib -- -D warnings, cargo test clean
  • E2E on the emulator (local jniLibs) against a server on the WSL host: handshake, ping both ways, HTTP + 1 MiB sha256 match, direct path; disconnect → "endpoint closed in 61 ms", server logged the disconnect within the same second, no crash
  • Dispatch the release workflow on main after merge → v0.0.42

🤖 Generated with Claude Code

https://claude.ai/code/session_01QedowxAkQAV7HoeJu8ZYZC

Andrew Chen and others added 2 commits August 21, 2026 13:38
EzvpnHandle::stop only aborted the run task and dropped the runtime, which
sends nothing on the wire: the server kept the client's address lease until
the 30 s QUIC idle timeout. Keep a clone of the session's endpoint in the
handle and close it (CONNECTION_CLOSE) on a short-lived teardown thread
that owns the runtime, bounded by a 3 s timeout built inside the runtime
context. The server now logs the disconnect immediately.

Also note in the build script and Android design doc that development and
testing happen on the arm64 Android VM, with the physical device reserved
for the signed release APK.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QedowxAkQAV7HoeJu8ZYZC
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QedowxAkQAV7HoeJu8ZYZC
@andrewchen5678
andrewchen5678 merged commit c47c460 into main Aug 21, 2026
6 checks passed
@andrewchen5678
andrewchen5678 deleted the android-graceful-stop branch August 21, 2026 21:06
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