Skip to content

Commit 050007d

Browse files
authored
fix: Configure max backoff and jitter ratio to ensure exponential backoff. (#463)
Without these set the event source retries every second, which is not the desired behavior.
1 parent 0c1302f commit 050007d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/sdk/server-node/src/platform/NodeRequests.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ export default class NodeRequests implements platform.Requests {
152152
...eventSourceInitDict,
153153
agent: this.agent,
154154
tlsParams: this.tlsOptions,
155+
maxBackoffMillis: 30 * 1000,
156+
jitterRatio: 0.5,
155157
};
156158
return new LDEventSource(url, expandedOptions);
157159
}

0 commit comments

Comments
 (0)