jeremyczhen / fdbus

FDBus - Fast Distributed Bus
https://blog.csdn.net/jeremy_cz/article/details/89060291
161 stars 85 forks source link

CONFIG_SOCKET_CONNECT_TIMEOUT does not work as expected. #39

Open sanbrother opened 7 months ago

sanbrother commented 7 months ago

We are using fdbus under QNX, and noticed that CONFIG_SOCKET_CONNECT_TIMEOUT does not work as expected. CONFIG_SOCKET_CONNECT_TIMEOUT's default value is 2000 (ms), but connect() takes as long as 90s to time out.

I found a similar issue at https://stackoverflow.com/questions/21783599/socket-so-sndtimeo-timout-is-double-the-set-value

It seems better to use select(), I will try select() later to see if it works.