FlushAndWait hangs when there are no events to flush
Closed this issue · 3 comments
Describe the bug
When calling client.FlushAndWait(TimeSpan.Zero)
it hangs when there are no events to flush. It can happen when there were no events or they were flushed automatically or flush was called before.
To reproduce
- Create LdClient
- Evaluate a flag
- Trigger event flush, e.g. by calling
client.Flush()
orclient.FlushAndWait()
- Call
client.FlushAndWait(TimeSpan.Zero)
Expected behavior
client.FlushAndWait(TimeSpan.Zero)
finishes work correctly if there are no events
SDK version
7.0.0
Language version, developer tools
net6.0
Additional context
The client is used in a short lived context and we need to flush events after the execution. There is no way of knowing if there are any events yet and calling FlushAndWait
could lead to a complete freeze if automatic flushing already happened. And there is no way to disable automatic flushing as well, only increase FlushInterval
@MisterMiros This has been fixed and released in 7.0.1. Thank you!
Closing because this has been released. If there are any further problems, then please open a new issue. Thank you.