We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! It is impossible to close posthog.Client when feature flags are enabled and no requests to get all flags were made.
posthog.Client
What happens:
FeatureFlagsPoller.run
poller.loaded <- false
fetchNewFeatureFlags
<-poller.shutdown
Client.Close
GetFeatureFlags
poller.loaded
Minimal reproduction example:
package main import ( "fmt" "os" "github.com/posthog/posthog-go" ) func main() { client, err := posthog.NewWithConfig("123", posthog.Config{ PersonalApiKey: "123", }) if err != nil { fmt.Println("could not initialize posthog client", err) os.Exit(1) } // NOTE: Uncomment for things to start working // flags, err := client.GetFeatureFlags() // fmt.Println("Flags", flags, err) fmt.Println("Trying to close the client...") if err := client.Close(); err != nil { fmt.Println("Failed to close:", err) } fmt.Println("Client closed.") }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi! It is impossible to close
posthog.Client
when feature flags are enabled and no requests to get all flags were made.What happens:
FeatureFlagsPoller.run
startspoller.loaded <- false
infetchNewFeatureFlags
because nobody reads from that channel<-poller.shutdown
is never consumed hence blockingClient.Close
method here.GetFeatureFlags
at least once. It starts readingpoller.loaded
channel hereMinimal reproduction example:
The text was updated successfully, but these errors were encountered: