Skip to content

Commit

Permalink
wrapTLS only work for clients or if we upgrade the whole server, so d…
Browse files Browse the repository at this point in the history
…isable until a better solution is inplace
  • Loading branch information
cirospaciari committed Sep 17, 2024
1 parent 3d68a94 commit 2ebbd9e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bun.js/api/bun/socket.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3062,6 +3062,11 @@ fn NewSocket(comptime ssl: bool) type {
if (this.socket.isDetached() or this.socket.isNamedPipe()) {
return JSValue.jsUndefined();
}
if (this.handlers.is_server) {
globalObject.throw("Cannot upgrade a server-side socket", .{});
return .zero;
}

const args = callframe.arguments(1);

if (args.len < 1) {
Expand Down

0 comments on commit 2ebbd9e

Please sign in to comment.