Re: [PATCH] Move timeout handling from ConnOpener::connect to ConnOpener::timeout

From: Rainer Weikusat <rweikusat_at_mobileactivedefense.com>
Date: Tue, 15 Jan 2013 22:31:37 +0000

Rainer Weikusat <rw_at_sapphire.mobileactivedefense.com> writes:
> The attached patch moves the body of the timeout handling code from
> the ConnOpener::connect method to the ConnOpener::timeout method
> instead of invoking ::connect from ::timeout in order to make squid
> enforced connect timeouts work

[...]

Attached is a preliminary updated version of this patch, 'preliminary'
here meaning it has survived tests for all use cases I could think of
at the moment without crashing the proxy. Changes:

- deals with the ConnOpener memory leak in ::timeout

- schedules the timeout via eventAdd instead of 'as file descriptor
  timeout'

- closes temporaryFd_ before doing a connect retry and opens a new
  connection from DelayedConnectRetry

I've left the stillConnecting as is, awaiting future comments on that.
The purpose of this code is mainly to solicit comments as well. I
assume that it is still buggy in subtle and less subtle ways (please
keep in mind that I haven't ever seen any of this before last Sunday
:-}). Also, it contains somewhat more code-duplication than will
likely be in a final version.

Received on Tue Jan 15 2013 - 22:31:53 MST

This archive was generated by hypermail 2.2.0 : Wed Jan 16 2013 - 12:00:06 MST