Skip to content

Commit c16162f

Browse files
committed
fix(io_uring): handle ENOTCONN error in shutdown path
1 parent 11a00ee commit c16162f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/io_uring.zig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,7 @@ pub const Completion = struct {
732732
.shutdown => .{
733733
.shutdown = if (res >= 0) {} else switch (@as(posix.E, @enumFromInt(-res))) {
734734
.CANCELED => error.Canceled,
735+
.NOTCONN => error.SocketNotConnected,
735736
else => |errno| posix.unexpectedErrno(errno),
736737
},
737738
},
@@ -1083,6 +1084,7 @@ pub const ReadError = error{
10831084

10841085
pub const ShutdownError = error{
10851086
Canceled,
1087+
SocketNotConnected,
10861088
Unexpected,
10871089
};
10881090

0 commit comments

Comments
 (0)