authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-09-12 20:55:15-07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-09-12 20:55:15-07:00
log17c1852b9fb3043110f1d5d75dc1a08124440e89
treea2479a4a33133a14ef3f03335294f820c756bc12
parent2f4616052da1e59ed4e88b61d246714ea79b09b5
signature Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

catch close errors in debug mode


1 files changed, 1 insertions(+), 1 deletions(-)

net.zig+1-1
...@@ -178,7 +178,7 @@ pub const Stream = struct {...@@ -178,7 +178,7 @@ pub const Stream = struct {
178178
179 // Resource allocation may fail; resource deallocation must succeed.179 // Resource allocation may fail; resource deallocation must succeed.
180 pub fn close(s: Stream) void {180 pub fn close(s: Stream) void {
181 sys.close(@intCast(@intFromEnum(s.socket))) catch {};181 sys.close(@intCast(@intFromEnum(s.socket))) catch if (builtin.mode == .Debug) unreachable;
182 }182 }
183183
184 pub fn shutdown(s: Stream, how: sys.SHUT) !void {184 pub fn shutdown(s: Stream, how: sys.SHUT) !void {