-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
pubsub.Receive()
will timeout
#2175
Comments
This is also a problem when using Redis sentinel. Sentinel uses PubSub to synchronise state data. The reconnect behaviour adds log entries every 3 seconds for each sentinel. |
The latest version doesn’t seem to be taking effect and this still happens. redis: discarding bad PubSub connection: read tcp 192.168.124.37:56730->xxxxxx:6379: wsarecv: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. version: v9 9.5.1 |
#2060 cause
SetReadDeadline
not called, soPubSub.ReceiveTimeout(ctx, 0)
will not get a read deadline set, thus it will receive thei/o timeout
error after some time. Related #2139.Expected Behavior
PubSub.ReceiveTimeout(ctx, 0)
will block forever until a message is received, So doesPubSub.Receive()
,PubSub.ReceiveMessage()
andPubSub.Channel()
.Current Behavior
PubSub.Receive()
will timeout if read nothing for sometime.Possible Solution
Revert #2060
Steps to Reproduce
Context (Environment)
Redis: 7.0.3
go-redis: master
The text was updated successfully, but these errors were encountered: