| ... | @@ -6092,17 +6092,13 @@ pub const SendError = error{ | ... | @@ -6092,17 +6092,13 @@ pub const SendError = error{ |
| 6092 | pub const SendMsgError = SendError || error{ | 6092 | pub const SendMsgError = SendError || error{ |
| 6093 | /// The passed address didn't have the correct address family in its sa_family field. | 6093 | /// The passed address didn't have the correct address family in its sa_family field. |
| 6094 | AddressFamilyNotSupported, | 6094 | AddressFamilyNotSupported, |
| 6095 | | | |
| 6096 | /// Returned when socket is AF.UNIX and the given path has a symlink loop. | 6095 | /// Returned when socket is AF.UNIX and the given path has a symlink loop. |
| 6097 | SymLinkLoop, | 6096 | SymLinkLoop, |
| 6098 | | | |
| 6099 | /// Returned when socket is AF.UNIX and the given path length exceeds `max_path_bytes` bytes. | 6097 | /// Returned when socket is AF.UNIX and the given path length exceeds `max_path_bytes` bytes. |
| 6100 | NameTooLong, | 6098 | NameTooLong, |
| 6101 | | | |
| 6102 | /// Returned when socket is AF.UNIX and the given path does not point to an existing file. | 6099 | /// Returned when socket is AF.UNIX and the given path does not point to an existing file. |
| 6103 | FileNotFound, | 6100 | FileNotFound, |
| 6104 | NotDir, | 6101 | NotDir, |
| 6105 | | | |
| 6106 | /// The socket is not connected (connection-oriented sockets only). | 6102 | /// The socket is not connected (connection-oriented sockets only). |
| 6107 | SocketNotConnected, | 6103 | SocketNotConnected, |
| 6108 | AddressNotAvailable, | 6104 | AddressNotAvailable, |
| ... | @@ -6400,14 +6396,7 @@ pub fn sendfile( | ... | @@ -6400,14 +6396,7 @@ pub fn sendfile( |
| 6400 | .SUCCESS => { | 6396 | .SUCCESS => { |
| 6401 | const amt: usize = @bitCast(rc); | 6397 | const amt: usize = @bitCast(rc); |
| 6402 | total_written += amt; | 6398 | total_written += amt; |
| 6403 | if (in_len == 0 and amt == 0) { | 6399 | return total_written; |
| 6404 | // We have detected EOF from `in_fd`. | | |
| 6405 | break; | | |
| 6406 | } else if (amt < in_len) { | | |
| 6407 | return total_written; | | |
| 6408 | } else { | | |
| 6409 | break; | | |
| 6410 | } | | |
| 6411 | }, | 6400 | }, |
| 6412 | | 6401 | |
| 6413 | .BADF => unreachable, // Always a race condition. | 6402 | .BADF => unreachable, // Always a race condition. |