Pass all options to network strategies in constructor.

This commit is contained in:
XMRig 2018-03-17 04:16:08 +07:00
parent 2e503f7f8c
commit a2f747fb0c
7 changed files with 28 additions and 28 deletions

View file

@ -4,8 +4,8 @@
* 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 2016-2017 XMRig <support@xmrig.com>
*
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2016-2018 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
@ -25,16 +25,15 @@
#include "interfaces/IStrategyListener.h"
#include "net/Client.h"
#include "net/strategies/SinglePoolStrategy.h"
#include "Options.h"
SinglePoolStrategy::SinglePoolStrategy(const Url *url, const char *agent, IStrategyListener *listener) :
SinglePoolStrategy::SinglePoolStrategy(const Url *url, int retryPause, const char *agent, IStrategyListener *listener) :
m_active(false),
m_listener(listener)
{
m_client = new Client(0, agent, this);
m_client->setUrl(url);
m_client->setRetryPause(Options::i()->retryPause() * 1000);
m_client->setRetryPause(retryPause * 1000);
}