pitaya icon indicating copy to clipboard operation
pitaya copied to clipboard

fix(nats): wait for reconnects on setup

Open hspedro opened this issue 11 months ago • 0 comments

Ported from v2 #439

If the initial connect fails, NATS will spawn reconnect async handlers. Thus, we need to wait for all reconnects to be attempted before returning to the caller, otherwise, we won't be making use of reconnections.

  • fix(app): init sig chan as buffered
  • fix(etcd): prevent shutdown from crashing app

If the etcd module shuts down before all connections are set up, it will crash trying to access sd.cli where it's still nil. Thus, adding a check on shutdown

hspedro avatar Jan 27 '25 16:01 hspedro