Update net

This commit is contained in:
XMRig 2020-12-02 11:32:11 +07:00
parent 121c515a07
commit 469b1f08de
No known key found for this signature in database
GPG key ID: 446A53638BE94409
14 changed files with 95 additions and 74 deletions

View file

@ -1,13 +1,7 @@
/* XMRig
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2014-2019 heapwolf <https://github.com/heapwolf>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright (c) 2014-2019 heapwolf <https://github.com/heapwolf>
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -160,6 +154,10 @@ uint64_t xmrig::HttpContext::elapsed() const
void xmrig::HttpContext::close(int status)
{
if (!get(id())) {
return;
}
auto listener = httpListener();
if (status < 0 && listener) {
@ -262,7 +260,7 @@ void xmrig::HttpContext::attach(http_parser_settings *settings)
settings->on_body = [](http_parser *parser, const char *at, size_t len) -> int
{
static_cast<HttpContext*>(parser->data)->body += std::string(at, len);
static_cast<HttpContext*>(parser->data)->body.append(at, len);
return 0;
};