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

Commit ad78e45

Browse files
committed
test: fix watcher_cross_stop
It's possible that recv_cb_called is bigger than the number of sockets, because if all sends succeed the recv callback is called twice: once with the actual data, and another time with 0.
1 parent 4189122 commit ad78e45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test-watcher-cross-stop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ TEST_IMPL(watcher_cross_stop) {
9191
for (i = 0; i < ARRAY_SIZE(sockets); i++)
9292
uv_close((uv_handle_t*) &sockets[i], close_cb);
9393

94-
ASSERT(0 < recv_cb_called && recv_cb_called <= ARRAY_SIZE(sockets));
94+
ASSERT(recv_cb_called > 0);
9595
ASSERT(ARRAY_SIZE(sockets) == send_cb_called);
9696

9797
uv_run(loop, UV_RUN_DEFAULT);

0 commit comments

Comments
 (0)