Skip to content

Commit cc2bcde

Browse files
committed
Lock around dial error to fix log output
1 parent c484d47 commit cc2bcde

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

provisionerd/provisionerd.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,13 @@ func (p *provisionerDaemon) connect(ctx context.Context) {
110110
if errors.Is(err, context.Canceled) {
111111
return
112112
}
113+
p.closeMutex.Lock()
113114
if p.isClosed() {
115+
p.closeMutex.Unlock()
114116
return
115117
}
116118
p.opts.Logger.Warn(context.Background(), "failed to dial", slog.Error(err))
119+
p.closeMutex.Unlock()
117120
continue
118121
}
119122
p.opts.Logger.Debug(context.Background(), "connected")

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