Skip to content

Commit d92a5d6

Browse files
Stop reusing ClientContext instance (#89)
Reusing ClientContext in multiple calls causes assertion failed: call_ == nullptr in client_context.cc
1 parent f2d8d60 commit d92a5d6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/parameter_test.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,12 @@ void Service(int seconds) {
6868
vector<pair<string, string>> GetValues(unique_ptr<KeyValueStore::Stub>& stub,
6969
const vector<string>& keys) {
7070
vector<pair<string, string>> values;
71-
ClientContext context;
72-
Request request;
73-
Response response;
7471

7572
for (const auto& key : keys) {
73+
ClientContext context;
74+
Request request;
75+
Response response;
76+
7677
// Key we are sending to the server.
7778
request.set_key(key);
7879
auto status = stub->GetValues(&context, request, &response);

0 commit comments

Comments
 (0)