Skip to content

Commit 0a72ac3

Browse files
committed
Upgrade libuv to bd6066cb
1 parent 79ce48d commit 0a72ac3

File tree

7 files changed

+2
-166
lines changed

7 files changed

+2
-166
lines changed

deps/uv/src/unix/core.c

-2
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,6 @@ void uv__finish_close(uv_handle_t* handle) {
235235
case UV_TCP:
236236
assert(!ev_is_active(&((uv_stream_t*)handle)->read_watcher));
237237
assert(!ev_is_active(&((uv_stream_t*)handle)->write_watcher));
238-
assert(((uv_stream_t*)handle)->fd == -1);
239-
uv__stream_destroy((uv_stream_t*)handle);
240238
break;
241239

242240
case UV_UDP:

deps/uv/src/unix/fs.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ void uv_fs_req_cleanup(uv_fs_t* req) {
8585

8686
switch (req->fs_type) {
8787
case UV_FS_READDIR:
88-
assert(req->ptr);
88+
assert((req->result == -1 && req->ptr == NULL)
89+
|| (req->result >= 0 && req->ptr != NULL));
8990
free(req->ptr);
9091
req->ptr = NULL;
9192
break;

deps/uv/src/unix/internal.h

-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ void uv_fatal_error(const int errorno, const char* syscall);
8181

8282
/* stream */
8383
int uv__stream_open(uv_stream_t*, int fd, int flags);
84-
void uv__stream_destroy(uv_stream_t* stream);
8584
void uv__stream_io(EV_P_ ev_io* watcher, int revents);
8685
void uv__server_io(EV_P_ ev_io* watcher, int revents);
8786
int uv__accept(int sockfd, struct sockaddr* saddr, socklen_t len);

deps/uv/src/unix/stream.c

-29
Original file line numberDiff line numberDiff line change
@@ -75,35 +75,6 @@ int uv__stream_open(uv_stream_t* stream, int fd, int flags) {
7575
}
7676

7777

78-
/* Clears out the write queue, invokes the callbacks attached
79-
* to each write request. Used when a stream is destroyed.
80-
*/
81-
static void uv__clear_queue(ngx_queue_t* wq, int status, uv_err_code code) {
82-
uv_write_t* req;
83-
ngx_queue_t* q;
84-
85-
while (!ngx_queue_empty(wq)) {
86-
q = ngx_queue_head(wq);
87-
ngx_queue_remove(q);
88-
89-
req = ngx_queue_data(q, uv_write_t, queue);
90-
if (req->cb) {
91-
uv_err_new(req->handle->loop, code);
92-
req->cb(req, status);
93-
}
94-
95-
if (req->bufs != req->bufsml)
96-
free(req->bufs);
97-
}
98-
}
99-
100-
101-
void uv__stream_destroy(uv_stream_t* stream) {
102-
uv__clear_queue(&stream->write_queue, -1, UV_EINTR);
103-
uv__clear_queue(&stream->write_completed_queue, 0, UV_OK);
104-
}
105-
106-
10778
void uv__server_io(EV_P_ ev_io* watcher, int revents) {
10879
int fd;
10980
struct sockaddr_storage addr;

deps/uv/test/test-list.h

-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ TEST_DECLARE (tcp_bind_error_fault)
3131
TEST_DECLARE (tcp_bind_error_inval)
3232
TEST_DECLARE (tcp_bind_localhost_ok)
3333
TEST_DECLARE (tcp_listen_without_bind)
34-
TEST_DECLARE (tcp_close)
3534
TEST_DECLARE (tcp_bind6_error_addrinuse)
3635
TEST_DECLARE (tcp_bind6_error_addrnotavail)
3736
TEST_DECLARE (tcp_bind6_error_fault)
@@ -118,7 +117,6 @@ TASK_LIST_START
118117
TEST_ENTRY (tcp_bind_error_inval)
119118
TEST_ENTRY (tcp_bind_localhost_ok)
120119
TEST_ENTRY (tcp_listen_without_bind)
121-
TEST_ENTRY (tcp_close)
122120

123121
TEST_ENTRY (tcp_bind6_error_addrinuse)
124122
TEST_ENTRY (tcp_bind6_error_addrnotavail)

deps/uv/test/test-tcp-close.c

-130
This file was deleted.

deps/uv/uv.gyp

-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@
245245
'test/test-spawn.c',
246246
'test/test-tcp-bind-error.c',
247247
'test/test-tcp-bind6-error.c',
248-
'test/test-tcp-close.c',
249248
'test/test-tcp-writealot.c',
250249
'test/test-threadpool.c',
251250
'test/test-timer-again.c',

0 commit comments

Comments
 (0)