Message leak detecting
This commit is contained in:
parent
33b57d7e67
commit
5627d6adac
|
|
@ -237,6 +237,10 @@ export default class WebRTC
|
||||||
}
|
}
|
||||||
public sendMessage(data: any)
|
public sendMessage(data: any)
|
||||||
{
|
{
|
||||||
|
if(data.type == ':rtcpack:')
|
||||||
|
{
|
||||||
|
throw "WebRTC Kanalında Sızma";
|
||||||
|
}
|
||||||
this.send({
|
this.send({
|
||||||
type: 'message',
|
type: 'message',
|
||||||
payload: data
|
payload: data
|
||||||
|
|
@ -291,6 +295,7 @@ export default class WebRTC
|
||||||
this.channel = undefined;
|
this.channel = undefined;
|
||||||
WebRTC.channels.delete(this.id);
|
WebRTC.channels.delete(this.id);
|
||||||
WebRTC.requireGC = true;
|
WebRTC.requireGC = true;
|
||||||
|
this.active = false;
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
this.emit('datachannel', event.channel);
|
this.emit('datachannel', event.channel);
|
||||||
|
|
|
||||||
|
|
@ -648,6 +648,7 @@ class $b8ba020b52f6b742$export$2e2bcd8739ae039 {
|
||||||
if (!this.channel) this.createDefaultDataChannel();
|
if (!this.channel) this.createDefaultDataChannel();
|
||||||
}
|
}
|
||||||
sendMessage(data) {
|
sendMessage(data) {
|
||||||
|
if (data.type == ':rtcpack:') throw "WebRTC Kanal\u0131nda S\u0131zma";
|
||||||
this.send({
|
this.send({
|
||||||
type: 'message',
|
type: 'message',
|
||||||
payload: data
|
payload: data
|
||||||
|
|
@ -694,6 +695,7 @@ class $b8ba020b52f6b742$export$2e2bcd8739ae039 {
|
||||||
this.channel = undefined;
|
this.channel = undefined;
|
||||||
$b8ba020b52f6b742$export$2e2bcd8739ae039.channels.delete(this.id);
|
$b8ba020b52f6b742$export$2e2bcd8739ae039.channels.delete(this.id);
|
||||||
$b8ba020b52f6b742$export$2e2bcd8739ae039.requireGC = true;
|
$b8ba020b52f6b742$export$2e2bcd8739ae039.requireGC = true;
|
||||||
|
this.active = false;
|
||||||
});
|
});
|
||||||
} else this.emit('datachannel', event.channel);
|
} else this.emit('datachannel', event.channel);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue