diff --git a/tools/astat.cpp b/tools/astat.cpp index c05375f0e..8783369e0 100644 --- a/tools/astat.cpp +++ b/tools/astat.cpp @@ -88,7 +88,7 @@ static void worker(ug_connection &c) FD_ZERO(&fds); FD_SET(c.fd, &fds); FD_SET(c.should_exit_fd[0], &fds); - int nfds = std::max(c.fd, c.should_exit_fd[0]) + 1; + int nfds = std::max(c.fd, c.should_exit_fd[0]) + 1; int rc = select(nfds, &fds, NULL, NULL, NULL); if (rc <= 0) {