| ... | @@ -3146,6 +3146,9 @@ pub const ConnectError = error{ | ... | @@ -3146,6 +3146,9 @@ pub const ConnectError = error{ |
| 3146 | | 3146 | |
| 3147 | /// The given path for the unix socket does not exist. | 3147 | /// The given path for the unix socket does not exist. |
| 3148 | FileNotFound, | 3148 | FileNotFound, |
| | 3149 | |
| | 3150 | /// Connection was reset by peer before connect could complete. |
| | 3151 | ConnectionResetByPeer, |
| 3149 | } || UnexpectedError; | 3152 | } || UnexpectedError; |
| 3150 | | 3153 | |
| 3151 | /// Initiate a connection on a socket. | 3154 | /// Initiate a connection on a socket. |
| ... | @@ -3223,6 +3226,7 @@ pub fn getsockoptError(sockfd: fd_t) ConnectError!void { | ... | @@ -3223,6 +3226,7 @@ pub fn getsockoptError(sockfd: fd_t) ConnectError!void { |
| 3223 | ENOTSOCK => unreachable, // The file descriptor sockfd does not refer to a socket. | 3226 | ENOTSOCK => unreachable, // The file descriptor sockfd does not refer to a socket. |
| 3224 | EPROTOTYPE => unreachable, // The socket type does not support the requested communications protocol. | 3227 | EPROTOTYPE => unreachable, // The socket type does not support the requested communications protocol. |
| 3225 | ETIMEDOUT => return error.ConnectionTimedOut, | 3228 | ETIMEDOUT => return error.ConnectionTimedOut, |
| | 3229 | ECONNRESET => return error.ConnectionResetByPeer, |
| 3226 | else => |err| return unexpectedErrno(err), | 3230 | else => |err| return unexpectedErrno(err), |
| 3227 | }, | 3231 | }, |
| 3228 | EBADF => unreachable, // The argument sockfd is not a valid file descriptor. | 3232 | EBADF => unreachable, // The argument sockfd is not a valid file descriptor. |