summaryrefslogtreecommitdiff
path: root/src/mongo/transport
diff options
context:
space:
mode:
authorJason Carey <jcarey@argv.me>2019-02-07 14:27:20 -0500
committerJason Carey <jcarey@argv.me>2019-02-08 12:16:40 -0500
commita52de284c19cd7d4ccf224ccc023d7f35542613b (patch)
tree5bf8727042fa814f8f48f92f9235cd24fcf92f20 /src/mongo/transport
parent0c26a39cf231efc2379698cd8996564bef855e17 (diff)
downloadmongo-a52de284c19cd7d4ccf224ccc023d7f35542613b.tar.gz
SERVER-39421 Fix opCtx and baton waits
1. Interruptible::waitForConditionOrInterruptFor with a predicate didn't wait the correct amount of time. 2. baton_asio_linux would fail to expire timers whose deadline == now (only expiring those 1 millisecond past now). This caused it to spin unnecessarily just as timers were expiring.
Diffstat (limited to 'src/mongo/transport')
-rw-r--r--src/mongo/transport/baton_asio_linux.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/transport/baton_asio_linux.h b/src/mongo/transport/baton_asio_linux.h
index 591e550bfc4..3a796129977 100644
--- a/src/mongo/transport/baton_asio_linux.h
+++ b/src/mongo/transport/baton_asio_linux.h
@@ -331,7 +331,7 @@ public:
now = clkSource->now();
// Fire expired timers
- for (auto iter = _timers.begin(); iter != _timers.end() && iter->first < now;) {
+ for (auto iter = _timers.begin(); iter != _timers.end() && iter->first <= now;) {
toFulfill.push_back(std::move(iter->second.promise));
_timersById.erase(iter->second.id);
iter = _timers.erase(iter);