mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-10 09:02:45 -05:00
#2207 Fixed regression in HTTP parser.
This commit is contained in:
@@ -50,14 +50,7 @@ void xmrig::HttpServer::onConnection(uv_stream_t *stream, uint16_t)
|
||||
{
|
||||
auto ctx = static_cast<HttpContext*>(tcp->data);
|
||||
|
||||
if (nread >= 0) {
|
||||
const auto size = static_cast<size_t>(nread);
|
||||
const auto parsed = ctx->parse(buf->base, size);
|
||||
|
||||
if (parsed < size) {
|
||||
ctx->close();
|
||||
}
|
||||
} else {
|
||||
if (nread < 0 || !ctx->parse(buf->base, static_cast<size_t>(nread))) {
|
||||
ctx->close();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user