From daecdacb1503f34a743b734c63a84651d4d9b7b1 Mon Sep 17 00:00:00 2001 From: otto <> Date: Fri, 13 Aug 2004 12:26:13 +0000 Subject: [PATCH] Reset deadline on failed transmit. Avoids a spinning process if all sends fail. ok henning@ --- src/usr.sbin/ntpd/client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/usr.sbin/ntpd/client.c b/src/usr.sbin/ntpd/client.c index 254bae52..283ee4b8 100644 --- a/src/usr.sbin/ntpd/client.c +++ b/src/usr.sbin/ntpd/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.30 2004/08/12 16:33:59 henning Exp $ */ +/* $OpenBSD: client.c,v 1.31 2004/08/13 12:26:13 otto Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -127,6 +127,7 @@ client_query(struct ntp_peer *p) if (ntp_sendmsg(p->query->fd, (struct sockaddr *)&p->addr->ss, &p->query->msg, NTP_MSGSIZE_NOAUTH, 0) == -1) { p->next = time(NULL) + INTERVAL_QUERY_PATHETIC; + p->deadline = 0; return (-1); }