Merge remote-tracking branch 'origin/v0.10'

Conflicts:
	src/unix/stream.c
	src/version.c
This commit is contained in:
Ben Noordhuis 2013-06-13 02:28:44 +02:00
commit 0c3b061aac
2 changed files with 27 additions and 13 deletions

View File

@ -1,3 +1,20 @@
2013.06.13, Version 0.10.11 (Stable), c3b75406a66a10222a589cb173e8f469e9665c7e
Changes since version 0.10.10:
* unix: unconditionally stop handle on close (Ben Noordhuis)
* freebsd: don't enable dtrace if it's not available (Brian White)
* build: make HAVE_DTRACE=0 should disable dtrace (Timothy J. Fontaine)
* unix: remove overzealous assert (Ben Noordhuis)
* unix: clear UV_STREAM_SHUTTING after shutdown() (Ben Noordhuis)
* unix: fix busy loop, write if POLLERR or POLLHUP (Ben Noordhuis)
2013.06.05, Version 0.10.10 (Stable), 0d95a88bd35fce93863c57a460be613aea34d2c5
Changes since version 0.10.9:

View File

@ -613,6 +613,7 @@ int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb) {
static void uv__drain(uv_stream_t* stream) {
uv_shutdown_t* req;
int status;
assert(QUEUE_EMPTY(&stream->write_queue));
uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLOUT);
@ -625,21 +626,17 @@ static void uv__drain(uv_stream_t* stream) {
req = stream->shutdown_req;
stream->shutdown_req = NULL;
stream->flags &= ~UV_STREAM_SHUTTING;
uv__req_unregister(stream->loop, req);
if (shutdown(uv__stream_fd(stream), SHUT_WR)) {
/* Error. Report it. User should call uv_close(). */
status = shutdown(uv__stream_fd(stream), SHUT_WR);
if (status)
uv__set_sys_error(stream->loop, errno);
if (req->cb) {
req->cb(req, -1);
}
} else {
uv__set_sys_error(stream->loop, 0);
((uv_handle_t*) stream)->flags |= UV_STREAM_SHUT;
if (req->cb) {
req->cb(req, 0);
}
}
else
stream->flags |= UV_STREAM_SHUT;
if (req->cb != NULL)
req->cb(req, status);
}
}
@ -1146,7 +1143,7 @@ static void uv__stream_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
if (uv__stream_fd(stream) == -1)
return; /* read_cb closed stream. */
if (events & UV__POLLOUT) {
if (events & (UV__POLLOUT | UV__POLLERR | UV__POLLHUP)) {
uv__write(stream);
uv__write_callbacks(stream);
}