launchdarkly / ld-relay

LaunchDarkly Relay Proxy
Other
111 stars 80 forks source link

fix: don't panic if envContext is closed twice #417

Closed cwaldren-ld closed 2 months ago

cwaldren-ld commented 3 months ago

It was possible for Close() to be invoked concurrently, which would cause a data race on some of the cleanup tasks (including closing other channels.)

This specifically fixes a panic when using a combination of exitAlways=1 and ignoreConnectionErrors=1.