Merge branch 'v0.6'
This commit is contained in:
commit
0d8cb08f83
@ -169,7 +169,15 @@ uv_loop_t* uv_loop_new(void) {
|
||||
void uv_loop_delete(uv_loop_t* loop) {
|
||||
uv_ares_destroy(loop, loop->channel);
|
||||
ev_loop_destroy(loop->ev);
|
||||
free(loop);
|
||||
|
||||
#ifndef NDEBUG
|
||||
memset(loop, 0, sizeof *loop);
|
||||
#endif
|
||||
|
||||
if (loop == default_loop_ptr)
|
||||
default_loop_ptr = NULL;
|
||||
else
|
||||
free(loop);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -82,6 +82,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) {
|
||||
case EHOSTUNREACH: return UV_EHOSTUNREACH;
|
||||
case EAI_NONAME: return UV_ENOENT;
|
||||
case ESRCH: return UV_ESRCH;
|
||||
case ETIMEDOUT: return UV_ETIMEDOUT;
|
||||
default: return UV_UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
@ -274,5 +274,4 @@ void uv__pipe_accept(EV_P_ ev_io* watcher, int revents) {
|
||||
|
||||
|
||||
void uv_pipe_pending_instances(uv_pipe_t* handle, int count) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -341,6 +341,13 @@ static void uv__write(uv_stream_t* stream) {
|
||||
int iovcnt;
|
||||
ssize_t n;
|
||||
|
||||
if (stream->flags & UV_CLOSING) {
|
||||
/* Handle was closed this tick. We've received a stale
|
||||
* 'is writable' callback from the event loop, ignore.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
start:
|
||||
|
||||
assert(stream->fd >= 0);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user