Skip to content
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

Bug: Nats watch #267

Open
cavus700 opened this issue Apr 5, 2024 · 1 comment
Open

Bug: Nats watch #267

cavus700 opened this issue Apr 5, 2024 · 1 comment

Comments

@cavus700
Copy link

cavus700 commented Apr 5, 2024

There is a bug in the nats implementation. WatchWithContext() uses the watch-channel of nats.KeyValue to watch for events. This channel can return nil in some cases but is it not checked in the go routine. So it panics when watch.Updates() returns nil.

Furthermore I am not sure if it is correct/necessary but the nats connection is closed multiple times in WatchWithContext() and I don't see the purpose of waiting for 5 seconds after an update. Why not get updates asap? Sorry for the two off topic questions but I would appreciate some clarification.

@cavus700
Copy link
Author

cavus700 commented Apr 5, 2024

I've created a PR for this #268

It does not work when the connections are closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant