From 0b6e10a1bb26d4820b8d02a6730738d16512c59e Mon Sep 17 00:00:00 2001 From: Jon Ayers Date: Thu, 15 Feb 2024 02:36:25 +0000 Subject: [PATCH] fix: keep sendLog async --- logger.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/logger.go b/logger.go index a74a4d7..2f3d75a 100644 --- a/logger.go +++ b/logger.go @@ -330,7 +330,11 @@ func (p *podEventLogger) sendLog(resourceName, token string, log agentsdk.Startu // If the logger was already closed, we await the close before // creating a new logger. This is to ensure all loggers get sent in order! _ = logger.closer.Close() - p.sendLog(resourceName, token, log) + go func() { + p.mutex.Lock() + defer p.mutex.Unlock() + p.sendLog(resourceName, token, log) + }() return } // We make this 5x the debounce because it's low-cost to persist a few pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy