File tree Expand file tree Collapse file tree 2 files changed +1
-6
lines changed Expand file tree Collapse file tree 2 files changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ const {LazySet} = require("./lazy_set");
2
2
const people = require ( "./people" ) ;
3
3
4
4
// This maps a stream_id to a LazySet of user_ids who are subscribed.
5
- let stream_subscribers ;
5
+ const stream_subscribers = new Map ( ) ;
6
6
7
7
function assert_number ( id ) {
8
8
if ( typeof id !== "number" ) {
@@ -29,10 +29,6 @@ function get_user_set(stream_id) {
29
29
return subscribers ;
30
30
}
31
31
32
- export function clear ( ) {
33
- stream_subscribers = new Map ( ) ;
34
- }
35
-
36
32
export function is_subscriber_subset ( stream_id1 , stream_id2 ) {
37
33
const sub1_set = get_user_set ( stream_id1 ) ;
38
34
const sub2_set = get_user_set ( stream_id2 ) ;
Original file line number Diff line number Diff line change @@ -140,7 +140,6 @@ exports.clear_subscriptions = function () {
140
140
// it should only be used in tests.
141
141
stream_info = new BinaryDict ( ( sub ) => sub . subscribed ) ;
142
142
subs_by_stream_id = new Map ( ) ;
143
- peer_data . clear ( ) ;
144
143
} ;
145
144
146
145
exports . clear_subscriptions ( ) ;
You can’t perform that action at this time.
0 commit comments