Skip to content

fix timeout by checking the socket for errors

Mart Lubbers requested to merge fix-timout-linux into master

In the old situation when the connect didn't immediately return, the socket was placed in a select. An error was throws only when the socket was in the exceptset. However, sockets are only in the exceptset in very particular cases (see man select). Unable to connect is not one of those cases.

Therefore to actually check if a connection was refused, the error status must be checked with getsockopt.

Also see (

Closes: clean-and-itasks/iTasks-SDK#348

Merge request reports