diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig index 0cf33519ba..22f72e51e8 100644 --- a/src/bun.js/api/server.zig +++ b/src/bun.js/api/server.zig @@ -1818,13 +1818,8 @@ pub fn NewServer(protocol_enum: enum { http, https }, development_kind: enum { d } pub fn doAccept(this: *ThisServer, globalThis: *jsc.JSGlobalObject, callframe: *jsc.CallFrame) bun.JSError!jsc.JSValue { - const arguments = callframe.arguments_old(1); + const fd_value = callframe.argumentsAsArray(1)[0]; - if (arguments.len < 1) { - return globalThis.throwNotEnoughArguments("accept", 1, arguments.len); - } - - const fd_value = arguments.ptr[0]; if (!fd_value.isNumber()) { return globalThis.throwInvalidArguments("accept expects a file descriptor number", .{}); } diff --git a/src/deps/uws/App.zig b/src/deps/uws/App.zig index cee8e33f67..55120c7ac4 100644 --- a/src/deps/uws/App.zig +++ b/src/deps/uws/App.zig @@ -369,7 +369,7 @@ pub fn NewApp(comptime ssl: bool) type { /// and will close it when the connection terminates. On failure (return value -1), /// the caller retains ownership and must close the file descriptor. /// - /// Supports both SSL/TLS and non-SSL sockets. + /// Supports both SSL/TLS and non-SSL sockets based on the server's SSL configuration. /// /// Returns 0 on success, -1 on failure. pub fn accept(app: *ThisApp, fd: bun.FileDescriptor) i32 {