mcp: don't forget to flush

This commit is contained in:
Adrià Arrufat
2026-03-02 21:46:49 +09:00
parent 43785bfab4
commit f2a30f8cdd
2 changed files with 4 additions and 4 deletions

View File

@@ -58,6 +58,7 @@ pub fn sendResponse(self: *Self, response: anytype) !void {
try std.json.Stringify.value(response, .{ .emit_null_optional_fields = false }, &aw.writer);
try aw.writer.writeByte('\n');
try self.writer.writeAll(aw.writer.buffered());
try self.writer.flush();
}
pub fn sendResult(self: *Self, id: std.json.Value, result: anytype) !void {