Skip to content

Commit

Permalink
activated the reconnect on too many rejects again
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Baumbach committed Nov 30, 2013
1 parent 05979c0 commit 4c428a3
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/main_poolminer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class CBlockProviderGW : public CBlockProvider {
memcpy((unsigned char*)&submitblock, (unsigned char*)block, 88);
std::cout << "[WORKER] collision found: " << submitblock.birthdayA << " <-> " << submitblock.birthdayB << " #" << totalCollisionCount << " @ " << submitblock.nTime << " by " << thread_id << std::endl;
boost::system::error_code submit_error = boost::asio::error::host_not_found;
boost::asio::write(*socket_to_server, boost::asio::buffer((unsigned char*)&submitblock, 88), boost::asio::transfer_all(), submit_error); //FaF
if (socket_to_server != NULL) boost::asio::write(*socket_to_server, boost::asio::buffer((unsigned char*)&submitblock, 88), boost::asio::transfer_all(), submit_error); //FaF
//if (submit_error)
// std::cout << submit_error << " @ submit" << std::endl;
if (!submit_error)
Expand Down Expand Up @@ -355,11 +355,11 @@ class CMasterThread : public CMasterThreadStub {
reject_counter = 0;
else
reject_counter++;
// if (reject_counter >= 3) {
// std::cout << "too many rejects (3) in a row, forcing reconnect." << std::endl;
// socket->close();
// done = true;
// }
if (reject_counter >= 3) {
std::cout << "too many rejects (3) in a row, forcing reconnect." << std::endl;
socket->close();
done = true;
}
{
std::map<int,unsigned long>::iterator it = statistics.find(retval);
if (it == statistics.end())
Expand Down Expand Up @@ -573,13 +573,13 @@ int main(int argc, char **argv)
} else
std::cout << "using SPHLIB (unsupported arch)" << std::endl;
#else
//TODO: make this compatible with 32bit systems
std::cout << "**** >>> WARNING" << std::endl;
std::cout << "**" << std::endl;
std::cout << "**" << "SSE4/AVX auto-detection not available on your machine" << std::endl;
std::cout << "**" << "please enable SSE4 or AVX manually" << std::endl;
std::cout << "**" << std::endl;
std::cout << "**** >>> WARNING" << std::endl;
//TODO: make this compatible with 32bit systems
std::cout << "**** >>> WARNING" << std::endl;
std::cout << "**" << std::endl;
std::cout << "**" << "SSE4/AVX auto-detection not available on your machine" << std::endl;
std::cout << "**" << "please enable SSE4 or AVX manually" << std::endl;
std::cout << "**" << std::endl;
std::cout << "**** >>> WARNING" << std::endl;
#endif
}

Expand Down

0 comments on commit 4c428a3

Please sign in to comment.