The GitHub Actions job "Build" on 
rocketmq-clients.git/fix/nodejs-startup-settings-race has succeeded.
Run started by GitHub user zhaohai666 (triggered by zhaohai666).

Head commit for run:
95cc123a3f9288f613bddb26d1d259ee73320b56 / zhaohaihzb <[email protected]>
fix(nodejs): attach a rejection handler to the first-settings promise at 
creation

onUnknownCommand() rejects the first-settings promise as soon as a status-only
telemetry command arrives. The promise is created before updateRoutes() but only
awaited after it finishes, so a rejection arriving during another topic's route
query or the retry backoff window had no rejection handler attached; under
Node.js's default unhandled-rejection behavior that terminates the process even
though the startup() caller would have handled the rejection.

Attach a no-op catch handler immediately after creating the promise; the await
below still observes the error and propagates it to the caller. Also clear the
startup resolvers in a finally block so they never dangle across the early-throw
(route fetch failure) and first-settings rejection paths.

Reproduced with a minimal script on Node v22.22.2 (exit code 1 pre-fix); a
regression test covering a telemetry error before route updates complete is
included.

Report URL: https://github.com/apache/rocketmq-clients/actions/runs/39561334615

With regards,
GitHub Actions via GitBox

Reply via email to