summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-08-15 09:22:13 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-08-15 09:22:13 +0000
commit32b0e63f1b7c859424ae119d9efacaf28cfd9ae3 (patch)
tree91ce06c9f3bd9c76531ad237e18c8f7aa801eba6
parentbc6583774079704f1598c207c8f1c88956d836e7 (diff)
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@
-rw-r--r--usr.sbin/rpki-client/main.c6
1 files 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 <claudio@openbsd.org>
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -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;