From 3f369313bfd5c06b4a32f7304a49209b4c91de10 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 13 Sep 2017 13:48:02 +0000 Subject: bugfix: spurious error message in s6-tcpserver?d when maxed connections --- src/conn-tools/s6-tcpserver4d.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/conn-tools/s6-tcpserver4d.c') diff --git a/src/conn-tools/s6-tcpserver4d.c b/src/conn-tools/s6-tcpserver4d.c index 7579ea2..914e981 100644 --- a/src/conn-tools/s6-tcpserver4d.c +++ b/src/conn-tools/s6-tcpserver4d.c @@ -344,12 +344,12 @@ int main (int argc, char const *const *argv, char const *const *envp) pidip = pidip_inyostack ; ipnum = ipnum_inyostack ; while (cont) { - if (iopause_g(x, 1 + (numconn < maxconn), 0) < 0) - strerr_diefu1sys(111, "iopause") ; + int h = numconn < maxconn ; + if (iopause_g(x, 1 + h, 0) < 0) strerr_diefu1sys(111, "iopause") ; if (x[0].revents & IOPAUSE_EXCEPT) strerr_dief1x(111, "trouble with selfpipe") ; if (x[0].revents & IOPAUSE_READ) handle_signals() ; - if (numconn < maxconn) + if (h) { if (x[1].revents & IOPAUSE_EXCEPT) strerr_dief1x(111, "trouble with socket") ; if (x[1].revents & IOPAUSE_READ) -- cgit v1.3.1