Bulletproofing the clientside connection logic.