freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: Does 'connect timeout' option in freetds.conf work?
- From: "Brian Bruns" <camber AT ais.org>
- To: freetds AT franklin.oit.unc.edu
- Subject: Re: Does 'connect timeout' option in freetds.conf work?
- Date: Mon, 15 Apr 2002 14:01:00 -0400
It appears to "almost" work ;-)
The code to handle timeouts is there, and the code to read the timeout
values from the freetds.conf file is there, but the two don't seem to be
hooked up.
You can set timeouts through the API calls though. I'll cook up a
permanant patch tonight, but roughly what needs doing is to modify the
tds_connect() function in login.c, create a integer variable at the top:
int connect_timeout = 0;
then sometime after calling tds_get_config() insert the following (just
ahead of "Jeff's hack" is where i'd put it):
if (config->connect_timeout) {
connect_timeout = config->connect_timeout;
} else if (login->connect_timeout) {
connect_timeout = login->connect_timeout;
}
Then just replace references to "login->connect_timeout" with
"connect_timeout" through the rest of the function.
Cheers,
Brian
> Reading the user guides suggests that an option 'connect timeout' is
> available. Does this function work because the tests I'm doing at the
> moment would suggest it isn't.
> i.e. When trying to connect to a IP address of a server that is not
> available. TDS waits until the linux network stack returns an error code.
>
> I noticed in the source code of the latest TDS snapshot there is code
> relating to the connect timeout option but not sure what exactly it is
> doing.
>
> Is there any changes I need to make before compiling to enable this code?
>
> Any help would be greatly appreciated
> Nick
-
Does 'connect timeout' option in freetds.conf work?,
Nick Brandon, 04/15/2002
- <Possible follow-up(s)>
- Re: Does 'connect timeout' option in freetds.conf work?, Brian Bruns, 04/15/2002
- Re: Does 'connect timeout' option in freetds.conf work?, James Cameron, 04/15/2002
Archive powered by MHonArc 2.6.24.