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

fix: force client to listen to unique subscriptions - #128

Merged
w3b6x9 merged 1 commit into
masterfrom
fix/duplicate-subscriptions
Jan 17, 2022
Merged

w3b6x9 merged 1 commit into
masterfrom
fix/duplicate-subscriptions

Conversation

@w3b6x9

@w3b6x9 w3b6x9 commented Jan 15, 2022

Copy link
Copy Markdown
Member

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Client can create duplicate subscriptions by listening to the same topic.

What is the new behavior?

Client can create one subscription for each unique topic.

Additional context

Fixes: #127

@w3b6x9
w3b6x9 force-pushed the fix/duplicate-subscriptions branch from 28f039a to 8319500 Compare January 15, 2022 01:04
@w3b6x9 w3b6x9 changed the title fix: allow client to listen to unique subscriptions fix: force client to listen to unique subscriptions Jan 15, 2022
@w3b6x9
w3b6x9 force-pushed the fix/duplicate-subscriptions branch from 8319500 to 816fef2 Compare January 15, 2022 01:06
Comment thread src/RealtimeClient.ts
}
}

leaveOpenTopic(topic: string): void {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return
}
this.sendJoin(timeout)
this.socket.leaveOpenTopic(this.topic)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GaryAustin1

Copy link
Copy Markdown

@w3b6x9
With limited testing for side effects...
I can confirm this fixed duplicates for both a full table subscription and with filters, plus having different filters to same table creates 2 subscriptions as expected.
Thanks for the fix!

@w3b6x9

w3b6x9 commented Jan 16, 2022

Copy link
Copy Markdown
Member Author

@GaryAustin1 you got it! thanks for confirming!

@w3b6x9
w3b6x9 requested a review from burggraf January 17, 2022 17:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Realtime allows multiple subscriptions to table

3 participants