Handle connection states differently.