-
Notifications
You must be signed in to change notification settings - Fork 19
[FSSDK-8501] fix: gracefully close client to dispatch queued events #376
New issue
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I posted just a few questions, mostly because I don't know Go too well.
Are we sure we need this change? I think this is already part of sdk implementation, this test also verifies it: https://github.com/optimizely/go-sdk/blob/master/pkg/event/processor_test.go#L348 unless we are trying something else here? |
Actually, this is the go routine https://github.com/optimizely/go-sdk/blob/master/pkg/event/dispatcher.go#L99 which fails to finish dispatching all queued events for a sudden client.Close() and this is called here https://github.com/optimizely/go-sdk/blob/master/pkg/event/processor.go#L323 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just some minor suggestions. Also, please update the file headers with 2023
Ticket: FSSDK-8501