Does 'connect timeout' option in freetds.conf
work?
Brian Bruns
camber at ais.org
Mon Apr 15 23:54:02 EDT 2002
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
More information about the FreeTDS
mailing list