1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-14 04:35:57 +01:00

Remove all down connections at websocket close.

This commit is contained in:
Juliusz Chroboczek 2020-04-27 01:37:27 +02:00
parent e7e1f248ea
commit d24aafd314

View file

@ -391,6 +391,12 @@ function serverConnect() {
document.getElementById('sharebox').checked = false; document.getElementById('sharebox').checked = false;
document.getElementById('sharebox').disabled = true; document.getElementById('sharebox').disabled = true;
setShareMedia(); 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)); reject(new Error('websocket close ' + e.code + ' ' + e.reason));
}; };
socket.onmessage = function(e) { socket.onmessage = function(e) {