Skip to content

v9.2.0 - Reconnection State Management

Latest

Choose a tag to compare

@mkozjak mkozjak released this 24 Sep 10:21
· 24 commits to trunk since this release

New Features

Add reconnection state management capabilities to resolve issue #178.

New Event

  • **** - Fired when all reconnection attempts have been exhausted

New Methods

  • **** - Get current reconnection attempt count
  • **** - Get maximum reconnection attempts configured
  • **** - Check if reconnection is in progress
  • **** - Check if client will attempt to reconnect

Example Usage

client.on('max_reconnects_reached', (code, reason) => {
    console.log('All reconnection attempts failed');
    // Handle permanent disconnection
});

if (client.willReconnect()) {
    showMessage('Will attempt to reconnect...');
} else {
    showMessage('No more reconnection attempts');
}

Changes

  • ✅ Fully backward compatible - no breaking changes
  • ✅ Comprehensive test coverage
  • ✅ Updated API documentation
  • ✅ Fixed edge case in close() method

Full Changelog: v9.1.3...v9.2.0