The TCPSocket connection can throw different exceptions. Gotta catch them all