Skip to content

v0.6.1: Merge pull request #57 from honeycombio/toshok.send-using-sync-once

Compare
Choose a tag to compare
@houndtravisci houndtravisci released this 21 Apr 16:32
9c3578f
It looks to be (theoretically, I haven't verified by testing it) possible for multiple goroutines to end up in this particular switch arm at the same time.

Use a `sync.Once` to make sure that even if that happens they can't both try to close the channel and/or send the trace.