Re: Squid patch

From: Michael Pelletier <mikep@dont-contact.us>
Date: Fri, 18 Jul 1997 17:03:38 -0400 (EDT)

On Fri, 18 Jul 1997, Jordan Mendelson wrote:
> I just commented the entire section out, doesn't seem to hurt anything :)

The only thing it'll affect is that if you get into a situation where
'www.microsoft.com' is timing out, you'll have to wait 26 minutes before
it returns an error to the user, as it will wait the full connectTimeout
value (default 120 seconds) for each individual IP address to time out,
rather than nine seconds for each address.

> > What do you think a good alternate approach might be? Maybe a little
> > FD_ENTRY variable to hold the connect timeout for that descriptor?
>
> Well, set the socket to non-blocking, then use select() to block until
> the timeout value. Either that or use alarm() and set the socket to
> blocking.

Can't do that with Squid -- if you block, it will freeze up all the other
connections that it's handling, since it's an event-driven
"multi-threaded" program.

I'll go ahead and put in some #ifdef _SQUID_LINUX_ stuff in the patch, and
use a timeout variable in the fd entry to set the socket lifetime.

Thanks for the information!

        -Mike Pelletier.
Received on Fri Jul 18 1997 - 14:06:07 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:35:48 MST