Hi, i'm not sure if tandyuk follows this thread, but i'd like to suggest a small patch to his code. I had problem when reconnecting after my network went down. The code seems to wait for 30 secs before reconnecting only on the first try, then tries again indefinitely without waiting and thus consumes lots of machine resources needlessly, and never reconnects at all. Adding "Sleep(30*1000)" at the end of the reconnect loop, just as it's done in main() when it first connects, solved it (at least on Mac OSX, will try on windows/cygwin on monday, at work). The patch follows:
diff --git a/src/primecoinMiner/main.cpp b/src/primecoinMiner/main.cpp
index f91e0ae..c66e314 100644
--- a/src/primecoinMiner/main.cpp
+++ b/src/primecoinMiner/main.cpp
@@ -1442,6 +1442,8 @@
workData.xptClient = xptClient_connect(&jsonRequestTarget, commandlineInput.numThreads);
if( workData.xptClient )
break;
+ std::cout << "Failed to reconnect, retry in 30 seconds" << std::endl;
+ Sleep(1000*30);
}
}
// has the block data changed?
Is there a way to incorporate that into the code?
thanks in advance,
Girino.