From 9d45d66c84b583e4437845ed7305675d82ae4f08 Mon Sep 17 00:00:00 2001 From: Edoardo Spadolini Date: Fri, 20 Dec 2024 16:07:51 +0100 Subject: [PATCH] Update SSH server expiry on heartbeat (#50488) --- lib/inventory/controller.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/inventory/controller.go b/lib/inventory/controller.go index 4bdbd2f596c41..b1825c240e439 100644 --- a/lib/inventory/controller.go +++ b/lib/inventory/controller.go @@ -1174,6 +1174,7 @@ func (c *Controller) keepAliveSSHServer(handle *upstreamHandle, now time.Time) e return nil } + handle.sshServer.resource.SetExpiry(now.Add(c.serverTTL).UTC()) if _, err := c.auth.UpsertNode(c.closeContext, handle.sshServer.resource); err == nil { if handle.sshServer.retryUpsert { c.testEvent(sshUpsertRetryOk)