Skip to content

Commit

Permalink
Stop reusing ClientContext instance (#89)
Browse files Browse the repository at this point in the history
Reusing ClientContext in multiple calls causes
assertion failed: call_ == nullptr in client_context.cc
  • Loading branch information
killenheladagen authored Aug 30, 2024
1 parent f2d8d60 commit d92a5d6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/parameter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ void Service(int seconds) {
vector<pair<string, string>> GetValues(unique_ptr<KeyValueStore::Stub>& stub,
const vector<string>& keys) {
vector<pair<string, string>> values;
ClientContext context;
Request request;
Response response;

for (const auto& key : keys) {
ClientContext context;
Request request;
Response response;

// Key we are sending to the server.
request.set_key(key);
auto status = stub->GetValues(&context, request, &response);
Expand Down

0 comments on commit d92a5d6

Please sign in to comment.