summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replication_executor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/replication_executor.cpp')
-rw-r--r--src/mongo/db/repl/replication_executor.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/repl/replication_executor.cpp b/src/mongo/db/repl/replication_executor.cpp
index 29d5056e067..be8dbb0ba9f 100644
--- a/src/mongo/db/repl/replication_executor.cpp
+++ b/src/mongo/db/repl/replication_executor.cpp
@@ -293,7 +293,8 @@ namespace {
scheduledRequest.expirationDate = kNoExpirationDate;
}
else {
- scheduledRequest.expirationDate = _networkInterface->now() + scheduledRequest.timeout;
+ scheduledRequest.expirationDate =
+ _networkInterface->now() + scheduledRequest.timeout.total_milliseconds();
}
boost::lock_guard<boost::mutex> lk(_mutex);
StatusWith<CallbackHandle> handle = enqueueWork_inlock(
@@ -465,7 +466,7 @@ namespace {
return std::make_pair(WorkItem(), CallbackHandle());
}
lk.unlock();
- if (nextWakeupDate == Date_t::max()) {
+ if (nextWakeupDate == Date_t(~0ULL)) {
_networkInterface->waitForWork();
}
else {
@@ -492,7 +493,7 @@ namespace {
_readyQueue.splice(_readyQueue.end(), _sleepersQueue, _sleepersQueue.begin(), iter);
if (iter == _sleepersQueue.end()) {
// indicate no sleeper to wait for
- return Date_t::max();
+ return Date_t(~0ULL);
}
return iter->readyDate;
}