Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
win: integrate uv_close_error into uv_close
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Aug 23, 2011
1 parent 6622c35 commit a8d2613
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/win/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ int uv_is_active(uv_handle_t* handle) {
}


/* TODO: integrate this with uv_close. */
static void uv_close_error(uv_handle_t* handle, uv_err_t e) {
void uv_close(uv_handle_t* handle, uv_close_cb cb) {
uv_tcp_t* tcp;
uv_pipe_t* pipe;
uv_process_t* process;
Expand All @@ -49,8 +48,8 @@ static void uv_close_error(uv_handle_t* handle, uv_err_t e) {
return;
}

handle->error = e;
handle->flags |= UV_HANDLE_CLOSING;
handle->close_cb = cb;

/* Handle-specific close actions */
switch (handle->type) {
Expand Down Expand Up @@ -116,12 +115,6 @@ static void uv_close_error(uv_handle_t* handle, uv_err_t e) {
}


void uv_close(uv_handle_t* handle, uv_close_cb close_cb) {
handle->close_cb = close_cb;
uv_close_error(handle, uv_ok_);
}


void uv_want_endgame(uv_handle_t* handle) {
if (!(handle->flags & UV_HANDLE_ENDGAME_QUEUED)) {
handle->flags |= UV_HANDLE_ENDGAME_QUEUED;
Expand Down

0 comments on commit a8d2613

Please sign in to comment.