wrapTLS only work for clients or if we upgrade the whole server, so disable until a better solution is inplace

This commit is contained in:
Ciro Spaciari
2024-09-13 15:22:44 -07:00
parent 1f0f666210
commit 992c52230d

View File

@@ -3066,6 +3066,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) {