Boost logo

Boost Users :

From: Dominique Devienne (ddevienne_at_[hidden])
Date: 2020-12-15 13:53:06


On Tue, Dec 15, 2020 at 2:29 PM Dominique Devienne <ddevienne_at_[hidden]>
wrote:

> On Tue, Dec 15, 2020 at 2:23 PM Richard Hodges via Boost-users <
> boost-users_at_[hidden]> 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()
            )
        );
    }



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net