Skip to content

Commit 25aa8ce

Browse files
authored
fix: keep sendLog async (#22)
1 parent d600173 commit 25aa8ce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

logger.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,11 @@ func (p *podEventLogger) sendLog(resourceName, token string, log agentsdk.Startu
330330
// If the logger was already closed, we await the close before
331331
// creating a new logger. This is to ensure all loggers get sent in order!
332332
_ = logger.closer.Close()
333-
p.sendLog(resourceName, token, log)
333+
go func() {
334+
p.mutex.Lock()
335+
defer p.mutex.Unlock()
336+
p.sendLog(resourceName, token, log)
337+
}()
334338
return
335339
}
336340
// We make this 5x the debounce because it's low-cost to persist a few

0 commit comments

Comments
 (0)
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