server: let the caller of sendSync free the string

Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
Francis Bouvier
2024-10-07 16:04:29 +02:00
parent 9c913b2e6c
commit 4c225e515d
4 changed files with 3 additions and 1 deletions

View File

@@ -207,6 +207,7 @@ pub fn sendEvent(
const resp = Resp{ .method = name, .params = params, .sessionId = sessionID };
const event_msg = try stringify(alloc, resp);
defer alloc.free(event_msg);
std.log.debug("event {s}", .{event_msg});
try server.sendSync(ctx, event_msg);
}