Fix blocking_lock panic inside async runtime, reduce pool to 4 connections

spawn_with_arc used blocking_lock() which panics inside tokio runtime.
Changed to async lock().await. Reduced StoragePool from 8 to 4 connections
for Android compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Scott Reimers 2026-03-22 22:10:50 -04:00
parent 43adbbdf7d
commit 7b9edc13da
3 changed files with 7 additions and 7 deletions

View file

@ -219,7 +219,7 @@ impl Network {
let conn_mgr = Arc::new(Mutex::new(conn_mgr));
// Spawn actor wrapping the same Arc<Mutex<CM>> (Phase 1: additive)
let conn_handle = ConnectionActor::spawn_with_arc(Arc::clone(&conn_mgr));
let conn_handle = ConnectionActor::spawn_with_arc(Arc::clone(&conn_mgr)).await;
// TCP UPnP mapping for HTTP post delivery (only if UDP UPnP succeeded)
let has_upnp_tcp = if let Some(ref mapping) = upnp_mapping {