title: python socket Errno 10060
body: <p>I'm using python socket to connect to a server but <em>sometimes</em> I get this:</p>
  
  <blockquote>
    <p>error: [Errno 10060] A connection attempt failed because the connected
    party did not properly respond after a period of time, or established
    connection failed because connected host has failed to respond</p>
  </blockquote>
  
  <p>when I call the socket.connect method </p>
  
  <pre><code>s= socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  s.bind((self._ipv4address, host_port))
  try:
      s.connect((dest_ip, dest_port))
  except:
      raise
  </code></pre>
  
  <p>Why am I seeing this error? And how do I solve the problem?</p>