diff options
author | 2023-07-31 06:50:55 -0700 | |
---|---|---|
committer | 2023-07-31 06:50:55 -0700 | |
commit | 67599f97adc77141331a5f4fc39e4d058dc70b2a (patch) | |
tree | 043c70b90a083ec415c9aaecd7015e1afb528bb4 | |
parent | 8b715dee5b7b27e169124db9d315766a66d832b5 (diff) | |
download | bun-67599f97adc77141331a5f4fc39e4d058dc70b2a.tar.gz bun-67599f97adc77141331a5f4fc39e4d058dc70b2a.tar.zst bun-67599f97adc77141331a5f4fc39e4d058dc70b2a.zip |
More logging
-rw-r--r-- | src/deps/uws.zig | 8 |
1 files changed, 7 insertions, 1 deletions
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 { |