From 67599f97adc77141331a5f4fc39e4d058dc70b2a Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Mon, 31 Jul 2023 06:50:55 -0700 Subject: More logging --- src/deps/uws.zig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/deps/uws.zig b/src/deps/uws.zig index 43711e696..10f836bbc 100644 --- a/src/deps/uws.zig +++ b/src/deps/uws.zig @@ -207,7 +207,7 @@ pub fn NewSocketHandler(comptime is_ssl: bool) type { ); } pub fn write(this: ThisSocket, data: []const u8, msg_more: bool) i32 { - return us_socket_write( + const result = us_socket_write( comptime ssl_int, this.socket, data.ptr, @@ -215,6 +215,12 @@ pub fn NewSocketHandler(comptime is_ssl: bool) type { @as(i32, @intCast(@as(u31, @truncate(data.len)))), @as(i32, @intFromBool(msg_more)), ); + + if (comptime Environment.allow_assert) { + debug("us_socket_write({*}, {d}) = {d}", .{ this.getNativeHandle(), data.len, result }); + } + + return result; } pub fn rawWrite(this: ThisSocket, data: []const u8, msg_more: bool) i32 { -- cgit v1.2.3