ActionCable: Handling client connection errors on server side

Ping -> PONG, we will use this technique later

TLDR: a full code snippet at the end of the article.

If you ever had a chance to work with WebSockets in Ruby close enough to handle disconnections, then you should know, that a package for working with WebSockets — ActionCable — has a peculiarity, or better to say — a defect that happens in scenarios such as Internet connection loss. The main problem behind…