From a19a073ebc96de96be77ef6f11421d98bc25b151 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 13 Oct 2017 11:38:37 -0700 Subject: [PATCH] Workaround bug for a moment --- src/cpp/server/server_cc.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cpp/server/server_cc.cc b/src/cpp/server/server_cc.cc index 6bd3ecda32a..d982a3d2b76 100644 --- a/src/cpp/server/server_cc.cc +++ b/src/cpp/server/server_cc.cc @@ -266,8 +266,11 @@ class Server::SyncRequestThreadManager : public ThreadManager { WorkStatus PollForWork(void** tag, bool* ok) override { *tag = nullptr; + // TODO(ctiller): workaround for GPR_TIMESPAN based deadlines not working + // right now gpr_timespec deadline = - gpr_time_from_millis(cq_timeout_msec_, GPR_TIMESPAN); + gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), + gpr_time_from_millis(cq_timeout_msec_, GPR_TIMESPAN)); switch (server_cq_->AsyncNext(tag, ok, deadline)) { case CompletionQueue::TIMEOUT: