-
Notifications
You must be signed in to change notification settings - Fork 16
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
Issue with possible loop on run #12
Comments
Looks like As for the |
I just noticed why you were trying to use |
Yeah, I want to unsubscribe from all channels, so I have to at least pass 1 arg. It sounds like this is the right path to just use I'm still not sure why the IO::Error on the specs, so I'll keep digging around on that. I must be missing something. |
Cool, I'll add some method overloads to accommodate that. I've been playing with this, too, and I can't seem to reproduce it without Cable. I'll post my findings on cable-cr/cable#48. |
Oh wait, I think I know what this is. It's not happening when the new connection spins up, which is what I thought was happening. It's that the I was able to reproduce that behavior very simply: require "../src/redis"
subscriber = Redis::Connection.new
spawn { subscriber.subscribe "foo" {} }
subscriber.close I'll try to have a fix out (along with the empty |
This also explains why the exception wasn't failing your specs. |
Nice! Glad you were able to find it. Thanks for the help on it. |
Released v0.5.0 with the fix for this. I confirmed that the specs on cable-cr/cable#48 pass locally with this change. |
Sweet! I ran it locally and most of those IO error issues did go away. There does still seem to be 1 left, but maybe not related?
Digging in to this one, it looks like the handler spec calls Removing this line fixes (which is nice), but it seems calling that |
I did see that once when I ran it, but it didn't show up again. I think it's due to asynchrony in If I understand the code in Stefan's client (and there is no guarantee for that), it may have been silently reconnecting to send the
This implementation doesn't do that because, while |
Ah, that makes sense. Good call. Yeah, I think calling that twice in a row should be avoided anyway, so definitely not an issue in this shard. 👍 |
I'm trying to integrate this shard in to Cable using the examples by @mjeffrey18 #7 (comment) but when I run the specs for Cable they seem to just hang after the first spec.
My guess is since we call
Cable.restart
between each spec, that runs theshutdown
which calls this:If I add some puts after that
redis_subscribe.run
, it never prints. Now, if I swap that out for this:redis_subscribe.unsubscribe("")
That will run the specs, though, I get a bunch of
IO::Error
The text was updated successfully, but these errors were encountered: