Skip to Content.
Sympa Menu

freetds - Re: Does 'connect timeout' option in freetds.conf work?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: Does 'connect timeout' option in freetds.conf work?
  • Date: Mon, 15 Apr 2002 22:54:02 -0400 (EDT)


On 16 Apr 2002, James Cameron wrote:

> On Tue, 2002-04-16 at 12:22, Brian Bruns wrote:
> > It's in CVS if ya want to try it on for size.
>
> Thanks.
>
> - is the IOCTL really setting the socket non-blocking? If so, it has to
> set it back to blocking mode afterwards, doesn't it?
>
> - normally I would expect a "connect with five second timeout" to be
> implemented as follows;
>
> set socket non-blocking (using fcntl or ioctl)
> issue connect()
> if return error is EINPROGRESS {
> select for writability, timeout five seconds
> if timeout happened {
> errno = ETIMEDOUT
> return -1;
> }
> }
> set socket blocking
> return 0; /* success */
>
> and so I don't quite understand how the code in login.c is supposed to
> work. Is it instead polling every tds_msleep(1) interval until time()
> returns a value high enough?

dunno, didn't write it. I just figured that I'd merge the conf file stuff
to what was there, I didn't change the timeout behaviour at all.

Brian





Archive powered by MHonArc 2.6.24.

Top of Page