Jon Nelson wrote:

If I may, I would suggest that neither patch is correct. You normally want to call connect *once*, and then select on the file descriptor.

connect() doesn't return a file descriptor in all cases. This patch addresses the case where connect() returns -1, and sets errno to EAGAIN. This happens when the socket you're trying to connect to is still listening, but its listen queue is full. This happens sometimes when a storm of courier's processes try to connect to a filter before that filter gets a chance to accept the connections.


At the end of your proscribed time limit, or earlier, the
file descriptor will be definitively connected, failed to connect, or
still trying.  Sam's patch is much closer, IMO, but still not quite
correct, because the patch calls connect multiple times.

It only calls connect again if connect didn't return a file descriptor.





------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to