Change log for WsSession leak in Red5; new version 2.0.16 released 4/23/2025
The leak was primarily seen during regular use of Red5 Pro's RTC client which uses a WebSocket for the initial connection with a switch to DataChannel if accepted / configured in the RTC client during startup.
Classes modified:
- org.red5.net.websocket.WebSocketConnection - local reference to the connected scope was modified from a
WeakReference
to theWebSocketScope
itself and marked final. In the ctor the scope is also added to the WsSession user properties for consolidated access within Tomcat. Several timeout properties were also added from the latest Tomcat 11.x documentation:BLOCKING_SEND_TIMEOUT
our default to 8000ms,ABNORMAL_SESSION_CLOSE_SEND_TIMEOUT
our default 10000ms,SESSION_CLOSE_TIMEOUT
our default 5000ms. The properties are standard for Tomcat and may be modified at-will via system property override; all values are long type in milliseconds. The maximum idle timeout is now configured to use the largest