diff options
author | Francis Dupont <fdupont@isc.org> | 2018-11-07 10:16:10 +0100 |
---|---|---|
committer | Tomek Mrugalski <tomasz@isc.org> | 2018-11-07 10:30:21 +0100 |
commit | 9724823f160af0ef5e8ccdf779087ff08a04457a (patch) | |
tree | 3fa713c3b58ac8dbf86bcb218bb245d47925dff5 /src/lib/http/client.h | |
parent | [#26,!106] Guard HTTP client connect with timeout. (diff) | |
download | kea-9724823f160af0ef5e8ccdf779087ff08a04457a.tar.xz kea-9724823f160af0ef5e8ccdf779087ff08a04457a.zip |
[26-httpclient-add-timeout-to-connect] Addressed concerns about doc
Diffstat (limited to 'src/lib/http/client.h')
-rw-r--r-- | src/lib/http/client.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/http/client.h b/src/lib/http/client.h index 132eda3477..ac33c9f9a3 100644 --- a/src/lib/http/client.h +++ b/src/lib/http/client.h @@ -86,6 +86,8 @@ public: /// /// Returned boolean value indicates whether the client should continue /// connecting to the server (if true) or not (false). + /// @note Beware that the IO error code can be set to "in progress" + /// so a not null error code does not always mean the connect failed. typedef std::function<bool(const boost::system::error_code&)> ConnectHandler; /// @brief Constructor. @@ -142,7 +144,11 @@ public: /// /// The default timeout for the transaction is set to 10 seconds /// (10 000 ms). If the timeout occurs, the callback is invoked with the - //// error code of @c boost::asio::error::timed_out. + /// error code of @c boost::asio::error::timed_out. + /// The timeout covers both the connect and the transaction phases + /// so when connecting to the server takes too long (e.g. with a + /// misconfigured firewall) the timeout is triggered. The connect + /// callback can be used to recognize this condition. /// /// @param url URL where the request should be send. /// @param request Pointer to the object holding a request. |