Commit d24aafd3 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Remove all down connections at websocket close.

parent e7e1f248
......@@ -391,6 +391,12 @@ function serverConnect() {
document.getElementById('sharebox').checked = false;
document.getElementById('sharebox').disabled = true;
setShareMedia();
for(let id in down) {
let c = down[id];
delete(down[id]);
c.close(false);
delMedia(id);
}
reject(new Error('websocket close ' + e.code + ' ' + e.reason));
};
socket.onmessage = function(e) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment