We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a0d89e commit 81ca933Copy full SHA for 81ca933
bin/laclm
30.1 MB
cmd/laclm/main.go
@@ -130,6 +130,11 @@ func run(ctx context.Context) error {
130
logCtx, logCancel := context.WithCancel(context.Background())
131
var logWg sync.WaitGroup
132
133
+ defer func() {
134
+ logCancel()
135
+ logWg.Wait()
136
+ }()
137
+
138
/* create a error channel */
139
errChLog := make(chan error, 1)
140
@@ -345,8 +350,6 @@ func run(ctx context.Context) error {
345
350
346
351
/* close the logging error channel and cancel logging context */
347
352
close(errChLog)
348
- logCancel()
349
- logWg.Wait()
353
354
return err
355
}
0 commit comments