rosbridge_suite
rosbridge_suite copied to clipboard
Websocket connection that doesn't subscribe to topics doesn't seem to get cleaned up properly
Description We have a phone app connecting to our robot using 2 websockets, one websocket for all communication with ros topics, and one websocket for executing service calls.
Whenever the phone reconnects only one websocket connection ends up getting closed, meaning that for everytime the phone reconnects an extra websocket connection stays open. After a while this causes a lot of unneeded connections, which also slow down the communication to the phone app to the point where data is no longer being received.
- Library Version: 0.11.13-1focal.20220107.073833
- ROS Version: 1.15.14 (noetic)
- Platform / OS: Ubuntu 20.04
Steps To Reproduce
Connect with a websocket connection that does not subscribe to any topics. Disconnect the websocket connection. Reconnect the websocket connection.
Expected Behavior After reconnecting the websocket connection point 1 connection is active.
Actual Behavior After reconnecting the websocket connection point 2 connections will be active.
When doing the steps to reproduce the issue with the same websocket connection but also subscribing to a topic using the connection, the problem seems to be gone.
Another strange thing that we have observed is that connections only get removed after the client has reconnected, instead of the connection being closed when the client is disconnected.
Is this behaviour as expected or is there anything else we can try in order to get websocket connections cleaned up properly without having to subscribe to some topic?
Thanks