From 3029ed57c064322b31220165ff81ee577e8a53b4 Mon Sep 17 00:00:00 2001 From: claudio Date: Wed, 10 May 2023 15:24:41 +0000 Subject: [PATCH] Reset the io_time (io timeout value) when the timer expires. Without this the next connect will immediatly timeout again which is not intended. It does not matter in the other case since the connection is destroyed anyway. Problem noticed by job@ and Jelle (jelle (at) luteijn.email) OK job@ tb@ --- usr.sbin/rpki-client/http.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/rpki-client/http.c b/usr.sbin/rpki-client/http.c index 6c78bc06caa..700f06b5b9d 100644 --- a/usr.sbin/rpki-client/http.c +++ b/usr.sbin/rpki-client/http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: http.c,v 1.73 2022/11/02 16:50:51 claudio Exp $ */ +/* $OpenBSD: http.c,v 1.74 2023/05/10 15:24:41 claudio Exp $ */ /* * Copyright (c) 2020 Nils Fisher * Copyright (c) 2020 Claudio Jeker @@ -1954,6 +1954,7 @@ proc_http(char *bind_addr, int fd) if (conn->pfd != NULL && conn->pfd->revents != 0) http_do(conn, http_handle); else if (conn->io_time <= now) { + conn->io_time = 0; if (conn->state == STATE_CONNECT) { warnx("%s: connect timeout", conn_info(conn)); -- 2.20.1