test: make tcp_close_while_connecting more resilient
It's not impossible for connect() to succeed before the handle is fully closed, so handle that case too. PR-URL: https://github.com/libuv/libuv/pull/1005 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
1cff5b7557
commit
e994000834
@ -37,7 +37,7 @@ static void close_cb(uv_handle_t* handle) {
|
||||
|
||||
|
||||
static void connect_cb(uv_connect_t* req, int status) {
|
||||
ASSERT(status == UV_ECANCELED);
|
||||
ASSERT(status == UV_ECANCELED || status == 0);
|
||||
uv_timer_stop(&timer2_handle);
|
||||
connect_cb_called++;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user