-
Notifications
You must be signed in to change notification settings - Fork 218
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
Using embedded subscribe and external client leads to io timeout #348
Comments
Hello, I've been using miniredis in my unit-tests and found unexpected behaviour when trying to subscribe with miniredis client and publish with https://github.com/redis/go-redis, which led to io timeout on publisher.
Then I've switched to go-redis on both sides which worked fine. Am I doing something wrong or is it a bug?
Sounds like a bug :)
I've attach a minimal reproducing example later
That would be great, thanks!
|
Also, make sure you use the /v2 version of miniredis. |
I've tried something like this:
Apparently the problem is not exactly with publish, but somehow redis-go publishes a message approx 12 seconds :) Miniredis version: |
I'll try to benchmark with native-redis, dockerized-redis and miniredis today, when I have more free time, but it looks strange, maybe it is even redis client issue |
The problem is that "Publish" writes to a channel where nothing is reading on. If you change that to work in a Go routine it works for me:
|
Hello, I've been using miniredis in my unit-tests and found unexpected behaviour when trying to subscribe with miniredis client and publish with https://github.com/redis/go-redis, which led to io timeout on publisher.
Then I've switched to go-redis on both sides which worked fine. Am I doing something wrong or is it a bug?
I've attach a minimal reproducing example later
The text was updated successfully, but these errors were encountered: