Subject: Timeout apparently not honored in tcp_socket_open

From: Bob Lockwood <[email-masked]>
Date: Thu, 15 Feb 2001 16:09:16 -0500

The OPENTIMEOUT parameter does not appear to always be honored in
tcp_socket_open.  This becomes apparent if you are trying to connect to
a server that is overloaded, or worse hung.

The problem can be seen by writing a dummy server that performs a listen
but then sleeps forever (i.e. never calls accept).  I did this and ran
the dummy server on port 25, then in my client made a call to
smtp_open_full after having set the OPENTIMEOUT.  The client will block
forever in this scenario.

The culprit is the code in tcp_socket_open, which performs a
non-blocking connect, followed by a blocking call to read (to validate
that the server is really there).

My question is two fold:

     1) Why was the socket set back to blocking before the call to
     read?

     2) Is there any chance of getting a future version of c-client
     fixed, so that tcp_socket_open truly supports the OPENTIMEOUT.

Thanks,
Bob

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------