title: What does ECONNABORTED mean when trying to connect a socket?
body: <p>I'm using python 2.7 on an ubuntu machine.</p>
  
  <p>The client tries to connect to the server.  I get a EINPROGRESS which is expected for non-blocking sockets.</p>
  
  <p>To check whether or not the connection succeeded, I do what the man page for {connect} suggest:</p>
  
  <pre><code># EINPROGRESS The socket is nonblocking and the connection cannot be
  # completed immediately.  It is possible to select(2) or poll(2) for
  # completion by selecting the socket for writing.  After select(2)
  # indicates writability, use getsockopt(2) to read the SO_ERROR option at
  # level SOL_SOCKET to determine whether connect() completed successfully
  # (SO_ERROR is zero) or unsuccessfully (SO_ERROR is one of the usual error
  # codes listed here, explaining the reason for the failure)
  </code></pre>
  
  <p>When the server is offline, this gives me a ECONNREFUSED.  So far so good.</p>
  
  <p>When the connection fails, I want to try again a few times.</p>
  
  <p><strong>Problem</strong>: the second time I try to connect that same socket, {connect} sends me ECONNABORTED.  This one isn't in the man page of {connect}.  What does it mean?</p>