From c21b3d08b08fd3870456e1b4aa0995bb24c371c7 Mon Sep 17 00:00:00 2001 From: fireice-uk Date: Fri, 13 Jan 2017 14:55:50 +0000 Subject: Fix for lack of proper timeout in cryptonote-universal-pool --- executor.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'executor.cpp') diff --git a/executor.cpp b/executor.cpp index 16a5a90..131f721 100644 --- a/executor.cpp +++ b/executor.cpp @@ -26,6 +26,10 @@ #include "console.h" #include "donate-level.h" +#ifdef _WIN32 +#define strncasecmp _strnicmp +#endif // _WIN32 + executor* executor::oInst = NULL; executor::executor() @@ -261,7 +265,16 @@ void executor::on_miner_result(size_t pool_id, job_result& oResult) if(!pool->have_sock_error()) { printer::inst()->print_msg(L3, "Result rejected by the pool."); - log_result_error(pool->get_call_error()); + + std::string error = pool->get_call_error(); + + if(strncasecmp(error.c_str(), "Unauthenticated", 15) == 0) + { + printer::inst()->print_msg(L2, "Your miner was unable to find a share in time. Either the pool difficulty is too high, or the pool timeout is too low."); + pool->disconnect(); + } + + log_result_error(std::move(error)); } else log_result_error("[NETWORK ERROR]"); -- cgit v1.1