mirror of
https://github.com/oatpp/oatpp.git
synced 2025-02-23 17:40:28 +08:00
Merge pull request #444 from samarai-jk/master
ClientConnectionPool: close pool-connection if server has closed it
This commit is contained in:
commit
6c504bfb47
@ -142,6 +142,12 @@ HttpRequestExecutor::executeOnce(const String& method,
|
|||||||
"[oatpp::web::client::HttpRequestExecutor::executeOnce()]: Failed to read response.");
|
"[oatpp::web::client::HttpRequestExecutor::executeOnce()]: Failed to read response.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto con_hdr = result.headers.getAsMemoryLabel<oatpp::data::share::StringKeyLabelCI>("Connection");
|
||||||
|
if (con_hdr == "close")
|
||||||
|
{
|
||||||
|
invalidateConnection(connectionHandle);
|
||||||
|
}
|
||||||
|
|
||||||
auto bodyStream = oatpp::data::stream::InputStreamBufferedProxy::createShared(connection,
|
auto bodyStream = oatpp::data::stream::InputStreamBufferedProxy::createShared(connection,
|
||||||
buffer,
|
buffer,
|
||||||
result.bufferPosStart,
|
result.bufferPosStart,
|
||||||
|
Loading…
Reference in New Issue
Block a user