Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit e3189d0

Browse files
authored
Merge branch 'master' into encrypt
2 parents 9fdfeb1 + a71786f commit e3189d0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

source/agent/conference/roomController.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1380,12 +1380,18 @@ module.exports.create = function (spec, on_init_ok, on_init_failed) {
13801380
};
13811381

13821382
var removeSubscriptions = function (stream_id) {
1383+
log.debug('removeSubscriptions:', stream_id);
13831384
if (streams[stream_id]) {
13841385
if (streams[stream_id].audio) {
13851386
streams[stream_id].audio.subscribers.forEach(function(terminal_id) {
13861387
if (terminals[terminal_id]) {
13871388
for (var subscription_id in terminals[terminal_id].subscribed) {
1388-
unsubscribeStream(terminal_id, subscription_id);
1389+
if (terminals[terminal_id].type !== 'aselect') {
1390+
unsubscribeStream(terminal_id, subscription_id);
1391+
} else if (terminals[terminal_id]
1392+
.subscribed[subscription_id].audio === stream_id) {
1393+
unsubscribeStream(terminal_id, subscription_id);
1394+
}
13891395
if (terminals[terminal_id].type === 'axcoder') {
13901396
for (var i in terminals[terminal_id].published) {
13911397
unpublishStream(terminals[terminal_id].published[i]);

0 commit comments

Comments
 (0)