mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
more child-process (#18688)
Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com>
This commit is contained in:
@@ -1843,7 +1843,7 @@ pub const PostgresSQLConnection = struct {
|
||||
// We create it right here so we can throw errors early.
|
||||
const context_options = tls_config.asUSockets();
|
||||
var err: uws.create_bun_socket_error_t = .none;
|
||||
tls_ctx = uws.us_create_bun_socket_context(1, vm.uwsLoop(), @sizeOf(*PostgresSQLConnection), context_options, &err) orelse {
|
||||
tls_ctx = uws.us_create_bun_ssl_socket_context(vm.uwsLoop(), @sizeOf(*PostgresSQLConnection), context_options, &err) orelse {
|
||||
if (err != .none) {
|
||||
return globalObject.throw("failed to create TLS context", .{});
|
||||
} else {
|
||||
@@ -1951,8 +1951,7 @@ pub const PostgresSQLConnection = struct {
|
||||
defer hostname.deinit();
|
||||
|
||||
const ctx = vm.rareData().postgresql_context.tcp orelse brk: {
|
||||
var err: uws.create_bun_socket_error_t = .none;
|
||||
const ctx_ = uws.us_create_bun_socket_context(0, vm.uwsLoop(), @sizeOf(*PostgresSQLConnection), uws.us_bun_socket_context_options_t{}, &err).?;
|
||||
const ctx_ = uws.us_create_bun_nossl_socket_context(vm.uwsLoop(), @sizeOf(*PostgresSQLConnection)).?;
|
||||
uws.NewSocketHandler(false).configure(ctx_, true, *PostgresSQLConnection, SocketHandler(false));
|
||||
vm.rareData().postgresql_context.tcp = ctx_;
|
||||
break :brk ctx_;
|
||||
|
||||
Reference in New Issue
Block a user