From f4ce60a26aa347aeacd77b6f877237b4d37deaff Mon Sep 17 00:00:00 2001 From: Edoardo Spadolini Date: Fri, 20 Dec 2024 16:29:33 +0100 Subject: [PATCH] Update SSH server expiry on heartbeat (#50490) --- lib/inventory/controller.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/inventory/controller.go b/lib/inventory/controller.go index 218781f8b035c..06c0e5e23126d 100644 --- a/lib/inventory/controller.go +++ b/lib/inventory/controller.go @@ -1127,6 +1127,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)