Skip to content
Snippets Groups Projects
Unverified Commit 3d74356e authored by nanahpang's avatar nanahpang Committed by GitHub
Browse files

Merge pull request #18858 from nanahpang/master

Add alarm in callback streaming test
parents a3062ca0 2d37a7a9
No related branches found
No related tags found
No related merge requests found
...@@ -285,8 +285,18 @@ class CallbackStreamingPingPongReactor final ...@@ -285,8 +285,18 @@ class CallbackStreamingPingPongReactor final
} }
return; return;
} }
write_time_ = UsageTimer::Now(); if (!client_->IsClosedLoop()) {
StartWrite(client_->request()); gpr_timespec next_issue_time = client_->NextRPCIssueTime();
// Start an alarm callback to run the internal callback after
// next_issue_time
ctx_->alarm_.experimental().Set(next_issue_time, [this](bool ok) {
write_time_ = UsageTimer::Now();
StartWrite(client_->request());
});
} else {
write_time_ = UsageTimer::Now();
StartWrite(client_->request());
}
} }
void OnDone(const Status& s) override { void OnDone(const Status& s) override {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment