fix rate limiter crash #286

This commit is contained in:
yinqiwen 2014-09-15 20:43:38 +08:00
parent 04ce1b25f3
commit 28be16b1dc

View File

@ -60,7 +60,7 @@ GenericRateLimiter::~GenericRateLimiter() {
} }
void GenericRateLimiter::Request(int64_t bytes, const Env::IOPriority pri) { void GenericRateLimiter::Request(int64_t bytes, const Env::IOPriority pri) {
assert(bytes < refill_bytes_per_period_); assert(bytes <= refill_bytes_per_period_);
MutexLock g(&request_mutex_); MutexLock g(&request_mutex_);
if (stop_) { if (stop_) {