Merge pull request #3652 from SChernykh/dev
Fixed HttpsClient::flush logic
This commit is contained in:
commit
0d9af3347d
1 changed files with 5 additions and 3 deletions
|
@ -189,10 +189,12 @@ void xmrig::HttpsClient::flush(bool close)
|
|||
}
|
||||
|
||||
char *data = nullptr;
|
||||
const size_t size = BIO_get_mem_data(m_write, &data); // NOLINT(cppcoreguidelines-pro-type-cstyle-cast)
|
||||
std::string body(data, size);
|
||||
const long size = BIO_get_mem_data(m_write, &data); // NOLINT(cppcoreguidelines-pro-type-cstyle-cast)
|
||||
std::string body(data, (size > 0) ? size : 0);
|
||||
|
||||
(void) BIO_reset(m_write);
|
||||
|
||||
HttpContext::write(std::move(body), close);
|
||||
if (!body.empty()) {
|
||||
HttpContext::write(std::move(body), close);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue