diff options
author | 2022-06-18 01:27:36 -0700 | |
---|---|---|
committer | 2022-06-22 06:56:47 -0700 | |
commit | ab888d2ebebea0d128f4151a4240180211d95f03 (patch) | |
tree | 7f0831ebc4a95f8abeda7191de6d0c9064346836 /src/deps | |
parent | be9efacf1bf03fba016bb02f1dd25766fd874033 (diff) | |
download | bun-ab888d2ebebea0d128f4151a4240180211d95f03.tar.gz bun-ab888d2ebebea0d128f4151a4240180211d95f03.tar.zst bun-ab888d2ebebea0d128f4151a4240180211d95f03.zip |
It connects! but the frames are corrupt
Diffstat (limited to 'src/deps')
-rw-r--r-- | src/deps/uws.zig | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/deps/uws.zig b/src/deps/uws.zig index 3d3629bcb..08037a890 100644 --- a/src/deps/uws.zig +++ b/src/deps/uws.zig @@ -64,11 +64,11 @@ pub fn NewSocketHandler(comptime ssl: bool) type { this.socket, ); } - pub fn isShutdown(this: ThisSocket) c_int { + pub fn isShutdown(this: ThisSocket) bool { return us_socket_is_shut_down( comptime ssl_int, this.socket, - ); + ) > 0; } pub fn isClosed(this: ThisSocket) c_int { return us_socket_is_closed( @@ -136,12 +136,10 @@ pub fn NewSocketHandler(comptime ssl: bool) type { comptime onEnd: anytype, ) void { const SocketHandler = struct { - pub fn on_open(socket: *Socket, _: c_int, ip: [*c]u8, port: c_int) callconv(.C) ?*Socket { + pub fn on_open(socket: *Socket, _: c_int, _: [*c]u8, _: c_int) callconv(.C) ?*Socket { onOpen( @ptrCast(*ContextType, @alignCast(std.meta.alignment(ContextType), us_socket_ext(comptime ssl_int, socket).?)), ThisSocket{ .socket = socket }, - bun.span(ip), - port, ); return socket; } |