Skip to content

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

Open
akelmanson wants to merge 1 commit intofaye:masterfrom
investtools:master
Open

Closes faye/faye-redis-ruby#3#17
akelmanson wants to merge 1 commit intofaye:masterfrom
investtools:master

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