test(xy): logs --tail and --follow
Fix a deadlock in the log-stream handler that caused all logs requests to hang: Connection used a single Mutex<JsonFramed> for both reads and writes, so the serve loop holding the read lock blocked the spawned notification task from writing. Split Connection into separate reader and writer mutexes. Also fix a response/notification ordering race: the log task now waits for an explicit ready signal sent by serve after writing the LOGS response, ensuring notifications never arrive at the client before their initiating response.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use crate::envelope::{Incoming, Notification, Request};
|
||||
use crate::framing::JsonFramed;
|
||||
use serde::de::DeserializeOwned;
|
||||
use serde::Serialize;
|
||||
use serde::de::DeserializeOwned;
|
||||
use std::path::Path;
|
||||
use thiserror::Error;
|
||||
use tokio::net::UnixStream;
|
||||
|
||||
Reference in New Issue
Block a user