[bug]: ResourceWatcher race condition on StopAsync()
and OnError()
#676
Labels
bug
Something isn't working
StopAsync()
and OnError()
#676
Describe the bug
It seems like there is a race condition between
ResourceWatcher.OnError()
andResourceWatcher.StopAsync()
.To reproduce
ResourceWatcher.StartAsync()
ResourceWatcher
to be connectedResourceWatcher.StopAsync()
StopAsync()
will put the ResourceWatcher into a stop state, butOnError()
will try to restart theResourceWatcher
until it succeeds and the watcher will actually never stop.Expected behavior
Calling
StopAsync
should guarantee that the ResourceWatcher stops and will never emit any new event untilStartAsync()
is called again. This is a critical requirement for theLeaderAwareResourceWatcher
.Screenshots
No response
Additional Context
Version: 8.0.0-pre.29
The text was updated successfully, but these errors were encountered: