add handling for socket.gaierror