Skip to content

Commit

Permalink
unix: rename WRITE_RETRY_ON_ERROR macro
Browse files Browse the repository at this point in the history
PR-URL: libuv#2097
Reviewed-By: Santiago Gimeno <[email protected]>
  • Loading branch information
bnoordhuis committed Dec 30, 2018
1 parent dce03d5 commit 7eca15d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/unix/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ struct uv__stream_select_s {
fd_set* swrite;
size_t swrite_sz;
};
# define WRITE_RETRY_ON_ERROR(send_handle) \
# define IS_TRANSIENT_WRITE_ERROR(errno, send_handle) \
(errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOBUFS || \
(errno == EMSGSIZE && send_handle))
(errno == EMSGSIZE && send_handle != NULL))
#else
# define WRITE_RETRY_ON_ERROR(send_handle) \
# define IS_TRANSIENT_WRITE_ERROR(errno, send_handle) \
(errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOBUFS)
#endif /* defined(__APPLE__) */

Expand Down Expand Up @@ -868,7 +868,7 @@ static void uv__write(uv_stream_t* stream) {
}

if (n < 0) {
if (!WRITE_RETRY_ON_ERROR(req->send_handle)) {
if (!IS_TRANSIENT_WRITE_ERROR(errno, req->send_handle)) {
err = UV__ERR(errno);
goto error;
} else if (stream->flags & UV_HANDLE_BLOCKING_WRITES) {
Expand Down

0 comments on commit 7eca15d

Please sign in to comment.