From e9940008349d2e7dcb1bde2fe9cf08d3ea806d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 18 Aug 2016 13:02:57 +0100 Subject: [PATCH] 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 --- test/test-tcp-close-while-connecting.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-tcp-close-while-connecting.c b/test/test-tcp-close-while-connecting.c index 60df7a57..90a31f31 100644 --- a/test/test-tcp-close-while-connecting.c +++ b/test/test-tcp-close-while-connecting.c @@ -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++; }