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:
Saúl Ibarra Corretgé 2016-08-18 13:02:57 +01:00
parent 1cff5b7557
commit e994000834

View File

@ -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++;
}