Skip to content

Commit 17ea215

Browse files
showelltimabbott
authored andcommitted
minor: Remove peer_data.clear().
1 parent 58855e8 commit 17ea215

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

static/js/peer_data.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const {LazySet} = require("./lazy_set");
22
const people = require("./people");
33

44
// This maps a stream_id to a LazySet of user_ids who are subscribed.
5-
let stream_subscribers;
5+
const stream_subscribers = new Map();
66

77
function assert_number(id) {
88
if (typeof id !== "number") {
@@ -29,10 +29,6 @@ function get_user_set(stream_id) {
2929
return subscribers;
3030
}
3131

32-
export function clear() {
33-
stream_subscribers = new Map();
34-
}
35-
3632
export function is_subscriber_subset(stream_id1, stream_id2) {
3733
const sub1_set = get_user_set(stream_id1);
3834
const sub2_set = get_user_set(stream_id2);

static/js/stream_data.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ exports.clear_subscriptions = function () {
140140
// it should only be used in tests.
141141
stream_info = new BinaryDict((sub) => sub.subscribed);
142142
subs_by_stream_id = new Map();
143-
peer_data.clear();
144143
};
145144

146145
exports.clear_subscriptions();

0 commit comments

Comments
 (0)