Catch more general socket.error.