From 60df92c2b24cb8105e9d5ad54ff430e56a35d987 Mon Sep 17 00:00:00 2001 From: Yves Rutschle Date: Tue, 14 Aug 2018 23:05:49 +0200 Subject: [PATCH] prevent repeated reads on broken sockets --- probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/probe.c b/probe.c index 2fac295..b01d40b 100644 --- a/probe.c +++ b/probe.c @@ -414,7 +414,7 @@ int probe_client_protocol(struct connection *cnx) if (res == PROBE_AGAIN) again++; } - if (again) + if ((again && (n > 0)) || ((n == -1) && (errno == EAGAIN))) return PROBE_AGAIN; /* Everything failed: match the last one */