Skip to content

Commit

Permalink
fix: stop stats analyzer when reconnecting, and do not allow infinite…
Browse files Browse the repository at this point in the history
… loop of mercury reconnection
  • Loading branch information
kwasniow committed Nov 14, 2024
1 parent 397373d commit 053265f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 1 addition & 3 deletions packages/@webex/internal-plugin-mercury/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,13 @@ webex.init({

### Retries


The default behaviour is for Mercury to continue to try to connect with an exponential back-off. This behavior can be adjusted with the following config params:

- `maxRetries` - the number of times it will retry before error. Default: 0
- `maxRetries` - the number of times it will retry before error. Default: 5
- `initialConnectionMaxRetries` - the number of times it will retry before error on the first connection. Once a connection has been established, any further connection attempts will use `maxRetries`. Default: 0
- `backoffTimeMax` - The maximum time between connection attempts in ms. Default: 32000
- `backoffTimeReset` - The time before the first retry in ms. Default: 1000


## Maintainers

This package is maintained by [Cisco Webex for Developers](https://developer.webex.com/).
Expand Down
6 changes: 6 additions & 0 deletions packages/@webex/internal-plugin-mercury/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,11 @@ export default {
* @type {String}
*/
beforeLogoutOptionsCloseReason: process.env.MERCURY_LOGOUT_REASON || 'done (forced)',

/**
* Maximum number of retries to attempt before giving up
* @type {Number}
*/
maxRetries: process.env.MERCURY_MAX_RETRIES || 5,
},
};

0 comments on commit 053265f

Please sign in to comment.