mirror of
https://github.com/jech/galene.git
synced 2024-11-14 04:35:57 +01:00
Dont send close on abort.
This commit is contained in:
parent
087f804100
commit
e7e1f248ea
1 changed files with 11 additions and 8 deletions
|
@ -50,16 +50,19 @@ Connection.prototype.setInterval = function(f, t) {
|
||||||
this.timers.push(setInterval(f, t));
|
this.timers.push(setInterval(f, t));
|
||||||
}
|
}
|
||||||
|
|
||||||
Connection.prototype.close = function() {
|
Connection.prototype.close = function(sendit) {
|
||||||
while(this.timers.length > 0)
|
while(this.timers.length > 0)
|
||||||
clearInterval(this.timers.pop());
|
clearInterval(this.timers.pop());
|
||||||
|
|
||||||
this.pc.close();
|
this.pc.close();
|
||||||
|
|
||||||
|
if(sendit) {
|
||||||
send({
|
send({
|
||||||
type: 'close',
|
type: 'close',
|
||||||
id: this.id,
|
id: this.id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function setUserPass(username, password) {
|
function setUserPass(username, password) {
|
||||||
window.sessionStorage.setItem(
|
window.sessionStorage.setItem(
|
||||||
|
@ -192,7 +195,7 @@ async function setLocalMedia() {
|
||||||
|
|
||||||
if(!document.getElementById('presenterbox').checked) {
|
if(!document.getElementById('presenterbox').checked) {
|
||||||
if(localMediaId) {
|
if(localMediaId) {
|
||||||
up[localMediaId].close();
|
up[localMediaId].close(true);
|
||||||
delete(up[localMediaId]);
|
delete(up[localMediaId]);
|
||||||
delMedia(localMediaId)
|
delMedia(localMediaId)
|
||||||
localMediaId = null;
|
localMediaId = null;
|
||||||
|
@ -235,7 +238,7 @@ async function setShareMedia() {
|
||||||
|
|
||||||
if(!document.getElementById('sharebox').checked) {
|
if(!document.getElementById('sharebox').checked) {
|
||||||
if(shareMediaId) {
|
if(shareMediaId) {
|
||||||
up[shareMediaId].close();
|
up[shareMediaId].close(true);
|
||||||
delete(up[shareMediaId]);
|
delete(up[shareMediaId]);
|
||||||
delMedia(shareMediaId)
|
delMedia(shareMediaId)
|
||||||
shareMediaId = null;
|
shareMediaId = null;
|
||||||
|
@ -498,7 +501,7 @@ function gotClose(id) {
|
||||||
if(!c)
|
if(!c)
|
||||||
throw new Error('unknown down stream');
|
throw new Error('unknown down stream');
|
||||||
delete(down[id]);
|
delete(down[id]);
|
||||||
c.close();
|
c.close(false);
|
||||||
delMedia(id);
|
delMedia(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue