Used a State class for connectionActive.