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

Closes faye/faye-redis-ruby#3 #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

akelmanson
Copy link

No description provided.

@jcoglan
Copy link
Collaborator

jcoglan commented Jan 29, 2017

Thanks for submitting this PR. Since there's no description text here and no further information in the commit, can you explain why this fixes issue #3?

@akelmanson
Copy link
Author

When faye-redis is called through an HTTP request, it's wrapped by EventMachine.next_tick (here) but when you publish a message using the client provided by Faye::RackAdapter#get_client, it doesn't use Faye::RackAdapter#handle_request, so it's not wrapped by EventMachine.next_tick. In this case em-hiredis callbacks are not triggered immediately.

My solution is simply wrap every method that use em-hiredis with EM.next_tick.

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

Successfully merging this pull request may close these issues.

2 participants