|
@@ -2207,6 +2207,9 @@ export default class JingleSessionPC extends JingleSession {
|
2207
|
2207
|
this.peerconnection.onnegotiationneeded = null;
|
2208
|
2208
|
this.peerconnection.onsignalingstatechange = null;
|
2209
|
2209
|
|
|
2210
|
+ // Remove any pending tasks from the queue
|
|
2211
|
+ this.modificationQueue.clear();
|
|
2212
|
+
|
2210
|
2213
|
this.modificationQueue.push(finishCallback => {
|
2211
|
2214
|
// The signaling layer will remove it's listeners
|
2212
|
2215
|
this.signalingLayer.setChatRoom(null);
|
|
@@ -2215,6 +2218,8 @@ export default class JingleSessionPC extends JingleSession {
|
2215
|
2218
|
this.peerconnection && this.peerconnection.close();
|
2216
|
2219
|
finishCallback();
|
2217
|
2220
|
});
|
|
2221
|
+
|
|
2222
|
+ // No more tasks can go in after the close task
|
2218
|
2223
|
this.modificationQueue.shutdown();
|
2219
|
2224
|
}
|
2220
|
2225
|
|