Hi,
I've got a server that is purposely behind a firewall to test the OPT_CONNECT_TIMEOUT. I want it to give up after 5000ms but it will always try somewhere around seven times to SYN before quitting which takes around 1 minute and 40 seconds. Is there soemthing else I need to modify to get it to stop trying after the connect timeout?
Thanks,
-Mike
Yes, 1 min and 40 seconds. Same for me!!
I'm not sure if it's a 7x to SYN issue, as it doesn't seem matter what value I actually set connect timeout too. I tried 1ms and still got a timeout of 1m 40s.
Anyone know a solution?
Hi,
I'm having this same problem.
I'm using MQX 4.0.0.
I see your issue was posted in Oct 2010, is there already a fix (workaround) for this? We are already Juli 2013 ??
I want a timeout of 10 sec on the connection function. (result = connect(sock, &addr, sizeof(addr));)
uint_32 | sock; |
uint_32 | result; |
uint_32 | opt_length = sizeof(uint_32); |
uint_32 | opt_value; |
opt_value = 10000;
result = setsockopt(sock, SOL_TCP, OPT_CONNECT_TIMEOUT, &opt_value, opt_length);
This results in a timeout after 1 min and 40 seconds
Any idea's ?
Hi Guys,
I guess I found the reason.
The OPT_CONNECT_TIMEOUT socket option sets R2 timeout (defined in RFC 793).
According to the RFC793: "The value of R2 SHOULD correspond to at least 100 seconds." that equls your 1min 40 seconds.
Based the TCP source code, its values is checked to be not less than 100 sec (defined by TCP_SENDTIMEOUT_MIN in tcp_prv.h).
Hope it is clear,
Andrey Butok
Hi Andrey,
I changed TCP_SENDTIMEOUT_MIN to 10000. (Instead of default 100000)
Now I have a timeout of 10 sec.
Thx
Christophe