From e57a81a46cba724f9749d9e7f19079a87f5a762a Mon Sep 17 00:00:00 2001 From: Anton Arnautov Date: Sat, 22 Jul 2023 14:15:05 +0200 Subject: [PATCH] Move setPublisher and sendAnswer retryable wrappers --- packages/client/src/StreamSfuClient.ts | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/packages/client/src/StreamSfuClient.ts b/packages/client/src/StreamSfuClient.ts index b5d7937d3c..45e2fa7a86 100644 --- a/packages/client/src/StreamSfuClient.ts +++ b/packages/client/src/StreamSfuClient.ts @@ -201,7 +201,6 @@ export class StreamSfuClient { }; updateSubscriptions = async (subscriptions: TrackSubscriptionDetails[]) => { - // TODO: retry handler lifted to Call so the state is reachable (?) return this.rpc.updateSubscriptions({ sessionId: this.sessionId, tracks: subscriptions, @@ -209,25 +208,14 @@ export class StreamSfuClient { }; setPublisher = async (data: Omit) => { - // FIXME: needs to compare values to abort - return runWithRetry( - handleFalsePositiveResponse(this.rpc.setPublisher.bind(this.rpc)), - { - isRetryable: isRetryablePreset, - }, - )({ + return this.rpc.setPublisher({ ...data, sessionId: this.sessionId, }); }; sendAnswer = async (data: Omit) => { - return runWithRetry( - handleFalsePositiveResponse(this.rpc.sendAnswer.bind(this.rpc)), - { - isRetryable: isRetryablePreset, - }, - )({ + return this.rpc.sendAnswer({ ...data, sessionId: this.sessionId, });