diff options
-rw-r--r-- | actioncable/CHANGELOG.md | 6 | ||||
-rw-r--r-- | actioncable/lib/action_cable/connection/base.rb | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/actioncable/CHANGELOG.md b/actioncable/CHANGELOG.md index d5bd58cfdb..f0502c06ff 100644 --- a/actioncable/CHANGELOG.md +++ b/actioncable/CHANGELOG.md @@ -1 +1,7 @@ +* ActionCable socket errors are now logged to the console + + Previously any socket errors were ignored and this made it hard to diagnose socket issues (e.g. as discussed in #28362). + + *Edward Poot* + Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/actioncable/CHANGELOG.md) for previous changes. diff --git a/actioncable/lib/action_cable/connection/base.rb b/actioncable/lib/action_cable/connection/base.rb index 0a517a532d..ac5f405dea 100644 --- a/actioncable/lib/action_cable/connection/base.rb +++ b/actioncable/lib/action_cable/connection/base.rb @@ -126,7 +126,8 @@ module ActionCable end def on_error(message) # :nodoc: - # ignore + # log errors to make diagnosing socket errors easier + logger.error "WebSocket error occurred: #{message}" end def on_close(reason, code) # :nodoc: |