Skip to content

Commit 3ae8c08

Browse files
committed
Bumped linter and fixed a potential race condition
The linter found this, which is neat. Don't increment your wait group counters inside go functions, kids.
1 parent 6f9e212 commit 3ae8c08

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ jobs:
1919
- name: golangci-lint
2020
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
2121
with:
22-
version: v2.1.6
22+
version: v2.6.0
2323
args: --timeout=5m

trillian/ctfe/ct_server/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,8 @@ func main() {
346346
}
347347

348348
shutdownWG := new(sync.WaitGroup)
349+
shutdownWG.Add(1)
349350
go awaitSignal(func() {
350-
shutdownWG.Add(1)
351351
defer shutdownWG.Done()
352352
// Allow 60s for any pending requests to finish then terminate any stragglers
353353
ctx, cancel := context.WithTimeout(context.Background(), time.Second*60)

0 commit comments

Comments
 (0)