Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Jul 29, 2024
1 parent 81b4ffd commit 2ac0404
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions apps/meteor/app/utils/client/lib/SDKClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,10 @@ const createStreamManager = () => {

const stop = (): void => {
streamProxy.off(eventLiteral, proxyCallback);
if (eventLiteral.includes('subscriptions-changed')) {
console.log('Stopping', eventLiteral);
}
// If someone is still listening, don't unsubscribe
if (streamProxy.has(eventLiteral)) {
if (eventLiteral.includes('subscriptions-changed')) {
console.log('Still listening', eventLiteral);
}
return;
}
if (eventLiteral.includes('subscriptions-changed')) {
console.log('No longer listening', eventLiteral);
}

if (stream) {
stream.stop();
Expand All @@ -197,9 +188,6 @@ const createStreamManager = () => {

const stream = streams.get(eventLiteral) || createNewMeteorStream(name, key, args);

if (eventLiteral.includes('subscriptions-changed')) {
console.log(streams.get(eventLiteral) ? 'Cached' : 'New', eventLiteral, new Error().stack);
}
stream.unsubList.add(stop);
if (!streams.has(eventLiteral)) {
streams.set(eventLiteral, stream);
Expand Down

0 comments on commit 2ac0404

Please sign in to comment.