Skip to content

fix(client/snowflake.go): prevent wg.Add data race

sbs requested to merge sbs/snowflake:fix/wg-add into main

In VSCode, the staticcheck tool emits this warning:

should call wg.Add(1) before starting the goroutine to avoid a race (SA2000)go-staticcheck

To avoid this warning, just move wg.Add outside.

Edited by sbs

Merge request reports