Catch ConnectionError during handshake in ping.py