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

Commit

Permalink
Browse files Browse the repository at this point in the history
unix: fix write queue double init
  • Loading branch information
bnoordhuis committed Sep 13, 2011
1 parent 3c00d87 commit d70c760
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/unix/stream.c
Expand Up @@ -642,6 +642,7 @@ int uv_write(uv_write_t* req, uv_stream_t* handle, uv_buf_t bufs[], int bufcnt,
uv__req_init((uv_req_t*) req);
req->cb = cb;
req->handle = handle;
req->type = UV_WRITE;
ngx_queue_init(&req->queue);

assert((handle->type == UV_TCP || handle->type == UV_NAMED_PIPE)
Expand All @@ -654,10 +655,6 @@ int uv_write(uv_write_t* req, uv_stream_t* handle, uv_buf_t bufs[], int bufcnt,
return -1;
}

ngx_queue_init(&req->queue);
req->type = UV_WRITE;


if (bufcnt < UV_REQ_BUFSML_SIZE) {
req->bufs = req->bufsml;
}
Expand Down

0 comments on commit d70c760

Please sign in to comment.