-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove crypto from OSDK #1051
Remove crypto from OSDK #1051
Conversation
@@ -275,18 +274,7 @@ export class ObjectSetListenerWebsocket { | |||
// so we filter those out. | |||
const readySubs = [...this.#subscriptions.values()].filter(isReady); | |||
|
|||
if (readySubs.length === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the behavior we want. We want to update that we have no more subscriptions so that we don't unnecessarily take up space over the wire
@@ -572,6 +565,7 @@ export class ObjectSetListenerWebsocket { | |||
|
|||
#handleMessage_subscriptionClosed(payload: SubscriptionClosed) { | |||
const sub = this.#subscriptions.get(payload.id); | |||
if (sub == null && this.#endedSubscriptions.has(payload.id)) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subscription is deleted in unsubscribe
Invalidated by push of ee04cb7
@@ -188,7 +188,7 @@ describe("ObjectSetListenerWebsocket", async () => { | |||
listener, | |||
); | |||
|
|||
subReq1 = await expectSingleSubscribeMessage(ws); | |||
subReq1 = await expectSubscribeMessages(ws, 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty subscribe messages are now sent
React-native has issues with dependencies on crypto. Removes our polyfill and usage in object set watcher. Also fixes a small bug that can cause issues with unsubscribing with multiple subscriptions