catch socket.timeout: timed out error