From d389b51dcd94448add8c7e03646af89cacc273af Mon Sep 17 00:00:00 2001 From: claudio Date: Thu, 15 Aug 2024 09:22:12 +0000 Subject: [PATCH] Call repo_check_timeout() before colleting the POLLOUT fds. Since repo_abort() called by repo_check_timeout() will add messages to be sent out. OK tb@ --- usr.sbin/rpki-client/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c index f722f9e95bc..da095f9cfea 100644 --- a/usr.sbin/rpki-client/main.c +++ b/usr.sbin/rpki-client/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.262 2024/07/12 09:27:32 claudio Exp $ */ +/* $OpenBSD: main.c,v 1.263 2024/08/15 09:22:12 claudio Exp $ */ /* * Copyright (c) 2021 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -1285,14 +1285,14 @@ main(int argc, char *argv[]) while (entity_queue > 0 && !killme) { int polltim; + polltim = repo_check_timeout(INFTIM); + for (i = 0; i < NPFD; i++) { pfd[i].events = POLLIN; if (queues[i]->queued) pfd[i].events |= POLLOUT; } - polltim = repo_check_timeout(INFTIM); - if (poll(pfd, NPFD, polltim) == -1) { if (errno == EINTR) continue; -- 2.20.1