aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/io/io_linux.zig2
-rw-r--r--src/network_thread.zig1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/io/io_linux.zig b/src/io/io_linux.zig
index 8e0a64f7d..eeb2352f8 100644
--- a/src/io/io_linux.zig
+++ b/src/io/io_linux.zig
@@ -1565,7 +1565,7 @@ const Syscall = struct {
};
pub fn openSocket(family: u32, sock_type: u32, protocol: u32) !os.socket_t {
- return Syscall.socket(family, sock_type | os.O.NONBLOCK | os.O.CLOEXEC, protocol);
+ return Syscall.socket(family, sock_type | os.O.NONBLOCK | os.SOCK.CLOEXEC, protocol);
}
pub var global: IO = undefined;
diff --git a/src/network_thread.zig b/src/network_thread.zig
index be5b84acb..0a39f574a 100644
--- a/src/network_thread.zig
+++ b/src/network_thread.zig
@@ -66,6 +66,7 @@ pub fn getAddressList(allocator: std.mem.Allocator, name: []const u8, port: u16)
pub fn init() !void {
if ((global_loaded.swap(1, .Monotonic)) == 1) return;
+ AsyncIO.global_loaded = true;
global = NetworkThread{
.pool = ThreadPool.init(.{ .max_threads = 1, .stack_size = 64 * 1024 * 1024 }),