[PATCH] Allow to setup connect timeout for TCP transport
Submitted by Pavel Strashkin
Assigned to D-Bus Maintainers
There is no way to setup connect timeout when you're trying to connect to dbus via TCP. For an example, if you have the following connection string "tcp:host=A,port=B", and host "A" is unavailable by some reason then your client will get in stuck. When it come back or when ETIMEDOUT error happens depends on OS. Get in stuck is a bad thing so there has to be a way to configure connect timeout via "timeout" keyword in connection string. The value is in miliseconds. Default timeout may be 60s. Attached patch introduces such feature so it's possible to use the following connection string: "tcp:host=A,port=B,timeout=5000" (5s timeout). I believe that it's a very helpfull feature. I'm sorry that my patch is for 1.2.24, but if everything is clear (logic, code, ...) then i'll backport it to master branch.