TLS final

This commit is contained in:
fireice-uk
2017-02-12 13:19:58 +00:00
parent f91229beeb
commit 433db1917e
9 changed files with 79 additions and 25 deletions
+4 -3
View File
@@ -313,7 +313,8 @@ void executor::on_switch_pool(size_t pool_id)
// If it fails, it fails, we carry on on the usr pool
// as we never receive further events
printer::inst()->print_msg(L1, "Connecting to dev pool...");
if(!pool->connect("donate.xmr-stak.net:3333", error))
const char* dev_pool_addr = jconf::inst()->GetTlsSetting() ? "donate.xmr-stak.net:6666" : "donate.xmr-stak.net:3333";
if(!pool->connect(dev_pool_addr, error))
printer::inst()->print_msg(L1, "Error connecting to dev pool. Staying with user pool.");
}
else
@@ -349,8 +350,8 @@ void executor::ex_main()
telem = new telemetry(pvThreads->size());
current_pool_id = usr_pool_id;
usr_pool = new jpsock(usr_pool_id);
dev_pool = new jpsock(dev_pool_id);
usr_pool = new jpsock(usr_pool_id, jconf::inst()->GetTlsSetting());
dev_pool = new jpsock(dev_pool_id, jconf::inst()->GetTlsSetting());
ex_event ev;
std::thread clock_thd(&executor::ex_clock_thd, this);