Skip to content

Commit

Permalink
dont let request_verb go out of scope
Browse files Browse the repository at this point in the history
  • Loading branch information
braindigitalis committed Nov 16, 2024
1 parent f53a582 commit 057db5e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/dpp/queues.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@

namespace dpp {

constexpr std::array request_verb {
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
};

namespace
{

Expand Down Expand Up @@ -196,14 +204,6 @@ http_request_completion_t http_request::run(in_thread* processor, cluster* owner
}
}

constexpr std::array request_verb {
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
};

multipart_content multipart;
if (non_discord) {
multipart = { postdata, mimetype };
Expand All @@ -226,7 +226,7 @@ http_request_completion_t http_request::run(in_thread* processor, cluster* owner
!hci.is_ssl,
owner->request_timeout,
protocol,
[processor, rv, hci, this, owner, start, _url, &request_verb](https_client* client) {
[processor, rv, hci, this, owner, start, _url](https_client* client) {
http_request_completion_t result{rv};
result.latency = dpp::utility::time_f() - start;
if (client->timed_out) {
Expand Down

0 comments on commit 057db5e

Please sign in to comment.