- commit
- 49bc875
- parent
- f944dff
- author
- Eric Bower
- date
- 2025-11-26 20:02:40 -0500 EST
fix: client socket fd ensure the socket is closed when the function exits
1 files changed,
+1,
-0
+1,
-0
1@@ -407,6 +407,7 @@ fn attach(daemon: *Daemon) !void {
2 fn clientLoop(_: *Cfg, client_sock_fd: i32) !void {
3 // use c_allocator to avoid "reached unreachable code" panic in DebugAllocator when forking
4 const alloc = std.heap.c_allocator;
5+ defer posix.close(client_sock_fd);
6
7 var poll_fds = try std.ArrayList(posix.pollfd).initCapacity(alloc, 2);
8 defer poll_fds.deinit(alloc);