Nicer connection handling for client.