You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(iobroker): give the SDK sole reconnect ownership (#119)
StreamHandler ran its own five-attempt reconnect timer alongside the
SDK's unbounded exponential backoff, and re-registered every listener
on each scheduled reconnect (duplicate handlers over time). Listeners
now register exactly once in connect(); stream_error and terminal
auth_failure are handled so info.connection accurately reflects
transient-down vs permanently-stopped state.
Give the SDK sole ownership of stream reconnection instead of running a competing five-attempt reconnect timer alongside it: `StreamHandler` now registers its stream listeners exactly once (fixing double-registration on repeated `connect()` calls) and handles `stream_error` and terminal `auth_failure`, so `info.connection` accurately reflects whether the stream is transiently down or has stopped for good.
test('repeated disconnect/reconnect cycles keep listener counts constant (regression: connect() used to re-register a fresh set of listeners every time)',async()=>{
134
+
constteslemetry=newTeslemetry('fake-token');
135
+
// The real SDK connect() no-ops while already active; simulate the SDK
136
+
// marking itself active on each call, as it would after a real reconnect.
test('stream_error is logged without scheduling a competing reconnect (regression: adapter used to run its own reconnect timer alongside the SDK)',async()=>{
0 commit comments