-
Notifications
You must be signed in to change notification settings - Fork 749
timer.go.I'm wondering if it's an nats issue. #880
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
Comments
@sgof1d Would you have a test case that reproduce this? The pool implementation does the right thing, I believe, in that when putting it back to the pool it stops the timer and if it can't (meaning it had fired), then it consumes from the channel:
|
yes, It seems that pool does thing right. the issue happens in gateway. I had tested that: so I'm wondering something is wrong in timer.Stop(), the go standard lib. |
I think I have seen some issue reports around that. Will try to reproduce with using simple timer/pool but outside of NATS and see... out of curiosity, which platform are you running on? |
Probably related to golang/go#47859? |
alpine running in container. |
Closing since looks like regression from Go that has been fixed since Go 1.16. |
go 1.17.5, 1.17.6 . nats.go
github.com/nats-io/nats.go v1.13.1-0.20211018182449-f2416a8b1483
some time the time.Timer returned by globalTimerPool.Get(a Duration) was fired already
so request() will fail with "nats timeout" in 10us or less.
the issue disappears if I disable pool.
The text was updated successfully, but these errors were encountered: