f1amingo opened a new pull request, #1490: URL: https://github.com/apache/rocketmq-clients/pull/1490
### Summary The telemetry reconnect timer callback calls `#renewStream(false)` unguarded, and `#renewStream` rethrows stream-creation failures. An exception escaping a `setTimeout` callback becomes an uncaughtException: with Node's default behavior the process terminates, and even when the application handles uncaughtException the reconnect loop is permanently over — the timer already fired and nothing reschedules it. The session can never re-register settings afterwards. `refresh()` has the same gap: when its renewal fails, the session is left without a stream and without any retry. ### Changes - TelemetrySession: catch renewal failures in the reconnect timer callback and reschedule with exponential backoff (1s, 2s, ... capped at 60s) until `release()` - Reset the backoff once inbound data proves the stream alive - `refresh()`: schedule a background retry when the renewal fails instead of leaving the session dead - Add `test/client/TelemetrySession.test.ts` covering the three behaviors ### How Did You Test This Change? - New unit tests pass: reconnect survives a transient creation failure and re-syncs settings; `release()` cancels a pending reconnect; `refresh()` failure triggers a background retry - Negative control: the same scenario crashes the process (uncaughtException from the timer callback) with the pre-fix code - `tsc` build and `eslint` clean; existing client unit tests pass -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
