Linux passes test_connection_fail

This commit is contained in:
Ryan Dahl 2011-04-19 02:09:58 -07:00
parent 461f0a74ce
commit 595756048c
3 changed files with 5 additions and 3 deletions

View File

@ -473,8 +473,9 @@ void oio_tcp_connect(oio_handle* handle) {
} else {
oio_err err = oio_err_new(handle, error);
if (req->connect_cb) {
req->connect_cb(req, err);
oio_connect_cb connect_cb = req->cb;
if (connect_cb) {
connect_cb(req, err);
}
handle->err = err;

View File

@ -40,7 +40,6 @@ typedef struct {
#define oio_req_private_fields \
oio_connect_cb connect_cb; \
ngx_queue_t read_reqs; \
oio_buf* read_bufs; \
ev_timer timer; \

View File

@ -25,6 +25,7 @@ TEST_DECLARE (close_cb_stack)
TEST_DECLARE (timeout)
TEST_DECLARE (fail_always)
TEST_DECLARE (pass_always)
TEST_DECLARE (test_connection_fail)
TASK_LIST_START
@ -38,4 +39,5 @@ TASK_LIST_START
TEST_ENTRY (fail_always)
TEST_ENTRY (pass_always)
TEST_ENTRY (test_connection_fail)
TASK_LIST_END