tadamsmar
Joined: 28 Dec 2009 Posts: 6
|
Posted: Fri Jan 15, 2010 7:07 pm Post subject: Problems setting the connect_timeout |
|
|
I am trying to set the connection timeout to 5 seconds with no luck.
Here my code (without the real net address). The real_connect call still hangs for much more than 5 seconds when I disconnect the target device from the net to cause a timeout.
unsigned int tmo = 5;
.
.
.
lclsts = mysql_options(mysql,MYSQL_OPT_CONNECT_TIMEOUT,&tmo);
if (lclsts == 0)
{
mysql=mysql_real_connect(mysql,"1.1.1.1","usr",0,"dichot",3306,0,0); |
|