mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
uv: upgrade to b6b97f3
This commit is contained in:
parent
460614125b
commit
c4549b8573
16
deps/uv/src/uv-unix.c
vendored
16
deps/uv/src/uv-unix.c
vendored
@ -427,14 +427,17 @@ void uv__server_io(EV_P_ ev_io* watcher, int revents) {
|
||||
watcher == &stream->write_watcher);
|
||||
assert(revents == EV_READ);
|
||||
|
||||
assert(!(((uv_handle_t*)stream)->flags & UV_CLOSING));
|
||||
assert(!(stream->flags & UV_CLOSING));
|
||||
|
||||
if (stream->accepted_fd >= 0) {
|
||||
ev_io_stop(EV_DEFAULT_ &stream->read_watcher);
|
||||
return;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
/* connection_cb can close the server socket while we're
|
||||
* in the loop so check it on each iteration.
|
||||
*/
|
||||
while (stream->fd != -1) {
|
||||
assert(stream->accepted_fd < 0);
|
||||
fd = uv__accept(stream->fd, (struct sockaddr*)&addr, sizeof addr);
|
||||
|
||||
@ -449,7 +452,6 @@ void uv__server_io(EV_P_ ev_io* watcher, int revents) {
|
||||
uv_err_new((uv_handle_t*)stream, errno);
|
||||
stream->connection_cb((uv_stream_t*)stream, -1);
|
||||
}
|
||||
|
||||
} else {
|
||||
stream->accepted_fd = fd;
|
||||
stream->connection_cb((uv_stream_t*)stream, 0);
|
||||
@ -897,7 +899,7 @@ static void uv__stream_io(EV_P_ ev_io* watcher, int revents) {
|
||||
stream->type == UV_NAMED_PIPE);
|
||||
assert(watcher == &stream->read_watcher ||
|
||||
watcher == &stream->write_watcher);
|
||||
assert(!(((uv_handle_t*)stream)->flags & UV_CLOSING));
|
||||
assert(!(stream->flags & UV_CLOSING));
|
||||
|
||||
if (stream->connect_req) {
|
||||
uv__stream_connect(stream);
|
||||
@ -985,10 +987,6 @@ static int uv__connect(uv_connect_t* req,
|
||||
|
||||
if (stream->fd <= 0) {
|
||||
if ((sockfd = uv__socket(addr->sa_family, SOCK_STREAM, 0)) == -1) {
|
||||
|
||||
}
|
||||
|
||||
if (sockfd < 0) {
|
||||
uv_err_new((uv_handle_t*)stream, errno);
|
||||
return -1;
|
||||
}
|
||||
@ -2065,6 +2063,8 @@ static int uv__socket(int domain, int type, int protocol) {
|
||||
static int uv__accept(int sockfd, struct sockaddr* saddr, socklen_t slen) {
|
||||
int peerfd;
|
||||
|
||||
assert(sockfd >= 0);
|
||||
|
||||
do {
|
||||
#if defined(SOCK_NONBLOCK) && defined(SOCK_CLOEXEC)
|
||||
peerfd = accept4(sockfd, saddr, &slen, SOCK_NONBLOCK | SOCK_CLOEXEC);
|
||||
|
2
deps/uv/src/win/process.c
vendored
2
deps/uv/src/win/process.c
vendored
@ -36,7 +36,7 @@ typedef struct env_var {
|
||||
int value_len;
|
||||
} env_var_t;
|
||||
|
||||
#define E_V(str) { ##str"=", L##str, sizeof(##str), 0, 0 }
|
||||
#define E_V(str) { str "=", L"" str, sizeof(str), 0, 0 }
|
||||
|
||||
#define UTF8_TO_UTF16(s, t) \
|
||||
size = uv_utf8_to_utf16(s, NULL, 0) * sizeof(wchar_t); \
|
||||
|
Loading…
Reference in New Issue
Block a user