#97 Ignore keepalive option with minergate and nicehash.com

This commit is contained in:
XMRig 2017-10-06 19:10:08 +03:00
parent af51513614
commit 914fdd5f0a
4 changed files with 25 additions and 8 deletions

View file

@ -24,6 +24,7 @@
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "net/Url.h"
@ -87,12 +88,6 @@ Url::~Url()
}
bool Url::isNicehash() const
{
return isValid() && (m_nicehash || strstr(m_host, ".nicehash.com"));
}
bool Url::parse(const char *url)
{
const char *p = strstr(url, "://");
@ -144,6 +139,23 @@ bool Url::setUserpass(const char *userpass)
}
void Url::applyExceptions()
{
if (!isValid()) {
return;
}
if (strstr(m_host, ".nicehash.com")) {
m_keepAlive = false;
m_nicehash = true;
}
if (strstr(m_host, ".minergate.com")) {
m_keepAlive = false;
}
}
void Url::setPassword(const char *password)
{
if (!password) {