Hey!
I'm facing this problem as well and just want to share my experience.
In our case this is only occurring when the Chrome tab is hidden and only after some time.
We've noticed that sometimes Janus doesn't send the `keepalive` message, which triggers the `timeout` message from the server, closing the connection.
We're using default values for keepalive (25s) and timeout (60s).
When a page using Janus is hidden, silent and without using WebRTC for more than 5 minutes, then the `keepalive` `setTimeout` might be intensively throttled so that it'll just be sent once a minute, which will fail to respect the 60s timeout.
In our case we'll increase keepalive and timeout values to 60s / 130s in order to workaround this issue.
it might make sense to change Janus default values as well given this Chrome feature.
Thanks!
Filipe Costa