On Tue, Dec 15, 2020 at 2:29 PM Dominique Devienne <ddevienne@gmail.com> wrote:
On Tue, Dec 15, 2020 at 2:23 PM Richard Hodges via Boost-users <boost-users@lists.boost.org> wrote:
Problem is, the HTTP client times out after 5s.

When you say that the client times out, what exactly is timing out?

A client async_read operation, async_write? Is the server simply dropping your connection because of inactivity?

OK, this is ambarassing... The timeout was right there in the server's code.
Once removed, everything's fine of course. Sorry for the noise. --DD

    void do_read() {
        // Make the request empty before reading,
        // otherwise the operation behavior is undefined.
        req_ = {};

        // Set the timeout.
        //stream_.expires_after(std::chrono::seconds(5));

        // Read a request
        http::async_read(
            stream_, buffer_, req_,
            beast::bind_front_handler(
                &session::on_read,
                shared_from_this()
            )
        );
    }