Created
November 9, 2016 11:46
-
-
Save palkan/42891d59f17f2cf98a074a073a0dbf35 to your computer and use it in GitHub Desktop.
ActionCable Streaming Patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActionCable::Channel::Streams | |
def worker_pool_stream_handler(broadcasting, user_handler, coder: nil) | |
{ connection: connection, id: @identifier.to_json } | |
end | |
end | |
class ActionCable::SubscriptionAdapter::SubscriberMap | |
def invoke_callback(callback, message) | |
callback[:connection].send(:websocket).transmit( | |
"{\"identifier\": #{callback[:id]},\"message\": #{message}}" | |
) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment