From 282158a1db94c7475de23ceb1c3788b615c96075 Mon Sep 17 00:00:00 2001 From: Intel Date: Mon, 5 May 2014 18:34:40 -0400 Subject: [PATCH] Fix vardiff --- src/server/poolserver/Stratum/Server.h | 4 ++-- src/server/poolserver/Stratum/ShareLimiter.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/poolserver/Stratum/Server.h b/src/server/poolserver/Stratum/Server.h index 0589076..a77246a 100644 --- a/src/server/poolserver/Stratum/Server.h +++ b/src/server/poolserver/Stratum/Server.h @@ -133,8 +133,6 @@ namespace Stratum void _OnAccept(ClientPtr client, const boost::system::error_code& error) { - _StartAccept(); - if (!error) { if (client->Start()) { _clients.insert(client); @@ -143,6 +141,8 @@ namespace Stratum } else { sLog.Debug(LOG_STRATUM, "Failed to accept stratum client"); } + + _StartAccept(); } private: diff --git a/src/server/poolserver/Stratum/ShareLimiter.cpp b/src/server/poolserver/Stratum/ShareLimiter.cpp index d15cdb9..d064c98 100644 --- a/src/server/poolserver/Stratum/ShareLimiter.cpp +++ b/src/server/poolserver/Stratum/ShareLimiter.cpp @@ -33,7 +33,7 @@ namespace Stratum _shares.pop_front(); } - uint32 interval = std::min(curTime - _startTime, uint64(sConfig.Get("RetargetTimeBuffer"))); + uint32 interval = sConfig.Get("RetargetTimeBuffer"); // Calculate shares/min double speed = double(_shares.size()*60) / double(interval);