Skip to content

Commit

Permalink
Fix messagingSession infinite reconnect loop on error and also add ba…
Browse files Browse the repository at this point in the history
…ckwards compatibility with AWS JS SDK V2 for getMessagingSessionEndpoint
  • Loading branch information
manasisurve committed Sep 19, 2022
1 parent d380975 commit d7fb117
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- `MessagingSession` infinite reconnect loop to break on timeout.
- `MessagingSession` `getMessagingSessionEndpoint` call is now backwards compatible with aws js sdk v2 and lower.

- `MessagingSession` reconnect loop did not break on error past reconnect deadline. Infinite reconnect loop was caused due to firstConnectionAttemptTimestamp not being set as startedConnectionAttempt was not invoked. Check https://github.com/aws/amazon-chime-sdk-js/issues/2372 for details.
- `MessagingSession` `getMessagingSessionEndpoint` call is now backwards compatible with AWS JS SDK v2.
- Use a default "playback" `latencyHint` when creating the `AudioContext` on Windows. Also adds a `setDefaultLatencyHint` API to `DefaultDeviceController` to allow for overriding.

## [3.7.0] - 2022-07-05
Expand Down
2 changes: 2 additions & 0 deletions src/messagingsession/DefaultMessagingSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ export default class DefaultMessagingSession implements MessagingSession {
private async startConnecting(reconnecting: boolean): Promise<void> {
let endpointUrl = this.configuration.endpointUrl;

// Moving this reconnect logic can potentially result into an infinite reconnect loop on errors.
// Check https://github.com/aws/amazon-chime-sdk-js/issues/2372 for details.
if (!reconnecting) {
this.reconnectController.reset();
}
Expand Down

0 comments on commit d7fb117

Please sign in to comment.