mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1119593 - Re-enable per-data-channel close, r=drno
This commit is contained in:
parent
d74c1c1422
commit
d38ef687df
@ -355,25 +355,11 @@ PeerConnectionTest.prototype.closePC = function() {
|
||||
* Close the open data channels, followed by the underlying peer connection
|
||||
*/
|
||||
PeerConnectionTest.prototype.close = function() {
|
||||
|
||||
// TODO: Bug 1118398 - We should try to close data channels first here.
|
||||
// return timerGuard(
|
||||
//var allChannels = this.pcLocal ? this.pcLocal.dataChannels :
|
||||
// this.pcRemote.dataChannels;
|
||||
//Promise.all(allChannels.map((channel, i) => this.closeDataChannels(i))),
|
||||
// 60000, "failed to close data channels")
|
||||
// .then(() => this.closePC());
|
||||
|
||||
var expectOnClose = channel =>
|
||||
(channel.onclose = () => info(channel + " closed"));
|
||||
if (this.pcLocal) {
|
||||
this.pcLocal.dataChannels.forEach(expectOnClose);
|
||||
}
|
||||
if (this.pcRemote) {
|
||||
this.pcRemote.dataChannels.forEach(expectOnClose);
|
||||
}
|
||||
|
||||
return this.closePC();
|
||||
var allChannels = (this.pcLocal ? this.pcLocal : this.pcRemote).dataChannels;
|
||||
return timerGuard(
|
||||
Promise.all(allChannels.map((channel, i) => this.closeDataChannels(i))),
|
||||
60000, "failed to close data channels")
|
||||
.then(() => this.closePC());
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user