Status/Resolution/Reason: To Fix//BugVerified
Reporter/Name(from Bugbase): Mosh Teitelbaum / ()
Created: 07/24/2018
Components: Web Socket
Versions: 2016,2018
Failure Type: Incorrectly functioning
Found In Build/Fixed In Build: 2016.0.06.308055 /
Priority/Frequency: Minor / All users will encounter
Locale/System: English / Win 2016
Vote Count: 0
Problem Description:
The WebSocket protocol defines the concept of "ping-pongs" which are small control frames sent from server to client (the "ping") and back (the "pong") as a sort of keepalive. Without these keepalive frames, some web browsers (specifically modern implementations of Firefox) may consider the WebSocket connection closed if too much time passes without any traffic over the connection.
Note, this happens whether or not the WebSocket Proxy is being used.
See https://tools.ietf.org/html/rfc6455#section-5.5.2 for details of the ping-pong part of the protocol.
Steps to Reproduce:
Create a WebSocket handler and a WebSocket client, open a WebSocket connection and wait. In Firefox, 10 minutes and 11 seconds after opening the connection, if there's no additional traffic, Firefox will throw an exception assuming the connection is closed and will force a disconnect. ColdFusion remains unaware of the disconnection.
Actual Result:
The WebSocket connection is disconnected.
Expected Result:
The WebSocket connection remains connected.
Any Workarounds:
I've managed to get around this problem by creating a scheduled task to run every few minutes (I have it at 2) to send a server message to all open connections. This forces traffic over the connection so that it never times out. However, it is absolutely a hack with much more overhead involved than if ping-pongs were implemented directly in CF.
Attachments:
Comments: