Ensure state is updated when reconnection occurs