From 338a8a0ee13388aceafa3d8b6d8add3b79e95986 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sun, 20 May 2012 08:17:42 +0200 Subject: Expired survey returns ETIMEDOUT instead of EAGAIN Up to now, when survey in surveyor pattern expired, xs_recv() returned EAGAIN. That made it impossible to distinguish epired survey from expired receive timeout (XS_RCVTIMEO). This patch make errors different in both cases. Signed-off-by: Martin Sustrik --- tests/survey.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/survey.cpp') diff --git a/tests/survey.cpp b/tests/survey.cpp index f21b217..2179779 100644 --- a/tests/survey.cpp +++ b/tests/survey.cpp @@ -126,7 +126,7 @@ int XS_TEST_MAIN () assert (rc == 3); void *watch = xs_stopwatch_start (); rc = xs_recv (surveyor, buf, sizeof (buf), 0); - assert (rc == - 1 && errno == EAGAIN); + assert (rc == - 1 && errno == ETIMEDOUT); unsigned long elapsed = xs_stopwatch_stop (watch) / 1000; time_assert (elapsed, (unsigned long) timeout); -- cgit v1.2.3