From 3baea2d237e0b223fac6cbfa4fd3f830ecc16caa Mon Sep 17 00:00:00 2001 From: LRN Date: Fri, 13 Jul 2012 16:24:38 +0000 Subject: [PATCH] Handle peek errors more appropriately in w32 select --- src/util/network.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/network.c b/src/util/network.c index 6d8b2869a..012b1af0b 100644 --- a/src/util/network.c +++ b/src/util/network.c @@ -1599,7 +1599,11 @@ GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds, i, readArray[i]->h, bret, waitstatus, error); if (bret == 0) { - if (error != ERROR_BROKEN_PIPE) + /* TODO: either add more errors to this condition, or eliminate it + * entirely (failed to peek -> pipe is in serious trouble, should + * be selected as readable). + */ + if (error != ERROR_BROKEN_PIPE && error != ERROR_INVALID_HANDLE) continue; } else if (waitstatus <= 0) -- 2.25.1