freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: jarek AT poczta.srv.pl
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] How to cancel ct_results ?
- Date: Wed, 16 Sep 2009 16:16:52 +0200
Hi!
Cytowanie "James K. Lowden" <jklowden AT freetds.org>:
Jarek wrote:
when connection to database
is lost just before call to ct_results, my application hangs. It looks
that ct_results doesn't return in such case.
It might be the case. Timeout logic is tricky, and no one has done much
with the ct-lib code since I re-wrote the libtds layer to correctly handle
timeouts (for the first time) in db-lib. What ct-lib needs is someone
with interest and knowledge to apply himself to the problem.
After some debugging, I've found that the problem comes from gnutls_record_recv.
There are few solutions:
1. Change the socket to non-blocking, but this probably need some changes also in other places where this socket is used.
2. Add select with timeout before socket read/write.
3. Send some signal or close socket from parallel thread after timeout (I'm not sure if it will help).
I'm ready to write this code, but I'd like to know which solution will be the best. I hope this code can be added to future releases of freetds.
Best regards
Jarek
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-
[freetds] How to cancel ct_results ?,
Jarek, 09/15/2009
-
Re: [freetds] How to cancel ct_results ?,
James K. Lowden, 09/15/2009
-
Re: [freetds] How to cancel ct_results ?,
jarek, 09/16/2009
- Re: [freetds] How to cancel ct_results ?, James K. Lowden, 09/16/2009
-
Re: [freetds] How to cancel ct_results ?,
jarek, 09/16/2009
-
Re: [freetds] How to cancel ct_results ?,
James K. Lowden, 09/15/2009
Archive powered by MHonArc 2.6.24.