diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-06-20 09:22:02 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-09-01 23:47:19 -0700 |
| commit | 397b7e4bb942b7fe3bd6f1652fa31ccec3ecc48e (patch) | |
| tree | e8d8ef82522f21922d3c18fa1b09be9417dda226 /src | |
| parent | 598b27f83c4d4dd72c5cfbd06ca60b12e2833429 (diff) | |
| download | niri-397b7e4bb942b7fe3bd6f1652fa31ccec3ecc48e.tar.gz niri-397b7e4bb942b7fe3bd6f1652fa31ccec3ecc48e.tar.bz2 niri-397b7e4bb942b7fe3bd6f1652fa31ccec3ecc48e.zip | |
ipc: Read only a single line on the client
Allow extensibility.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ipc/server.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ipc/server.rs b/src/ipc/server.rs index 5b614a83..5d2c8524 100644 --- a/src/ipc/server.rs +++ b/src/ipc/server.rs @@ -132,7 +132,8 @@ async fn handle_client(ctx: ClientCtx, stream: Async<'_, UnixStream>) -> anyhow: } } - let buf = serde_json::to_vec(&reply).context("error formatting reply")?; + let mut buf = serde_json::to_vec(&reply).context("error formatting reply")?; + buf.push(b'\n'); write.write_all(&buf).await.context("error writing reply")?; Ok(()) |
