diff --git a/crates/spaceshd/src/server.rs b/crates/spaceshd/src/server.rs index 1c33c78..608678a 100644 --- a/crates/spaceshd/src/server.rs +++ b/crates/spaceshd/src/server.rs @@ -426,6 +426,8 @@ mod tests { } // Second client: attach to the same surface, expect snapshot to contain the marker. + // Re-verify the socket is still up before connecting (handles any scheduling jitter). + wait_for_socket(&sock).await; let mut s2 = UnixStream::connect(&sock).await.unwrap(); let r = req(&mut s2, 1, Cmd::Attach { surface_id: surface_id.clone() }).await; let snap = res_data(&r)["snapshot"].as_str().unwrap();