Catch socket.timeout.