Skip to content

Even when network bandwidth is fully utilized and then restored, the Get function keeps returning failure. #2285

@Lucas2525117

Description

@Lucas2525117

Hello, I'm encountering a problem. When the server's network bandwidth is fully utilized, the Get function of httplib::Client fails to return, even after the bandwidth returns to normal.My usage is as follows:

httplib::Client cli(host_.c_str(), port_);
cli.set_connection_timeout(std::chrono::seconds(5));
cli.set_read_timeout(std::chrono::seconds(5));
cli.set_write_timeout(std::chrono::seconds(5));
auto res = cli.Get("/xxx");
if (!res || 200 != res->status) {
    return FALSE;
}
return TRUE;

Looking forward to your reply, thank you.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions