diff options
Diffstat (limited to 'lib/assets/javascripts/cable/subscriber_manager.js.coffee')
-rw-r--r-- | lib/assets/javascripts/cable/subscriber_manager.js.coffee | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/assets/javascripts/cable/subscriber_manager.js.coffee b/lib/assets/javascripts/cable/subscriber_manager.js.coffee index 922c74808c..0b6a16590c 100644 --- a/lib/assets/javascripts/cable/subscriber_manager.js.coffee +++ b/lib/assets/javascripts/cable/subscriber_manager.js.coffee @@ -32,5 +32,7 @@ class Cable.SubscriberManager sendCommand: (subscriber, command) -> {identifier} = subscriber - return true if identifier is Cable.PING_IDENTIFIER - @consumer.send({command, identifier}) + if identifier is Cable.PING_IDENTIFIER + @consumer.connection.isOpen() + else + @consumer.send({command, identifier}) |