Refine the streaming, add UT, add error handling.

This commit is contained in:
Chunting Gu
2019-08-09 16:10:16 +08:00
parent c669551552
commit feae9b7acc
17 changed files with 316 additions and 212 deletions
+5 -1
View File
@@ -232,7 +232,11 @@ ResponsePtr ClientSession::Send(RequestPtr request, bool stream) {
}
}
return client->response();
auto response = client->response();
// The client object might be cached in the pool.
// Reset to make sure it won't keep a reference to the response object.
client->Reset();
return response;
}
} // namespace webcc