mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-31 22:45:36 +01:00
HTTPClientSession: don't attempt to reconnect if no host is set (such as when creating a HTTPClientSession with a connected StreamSocket)
This commit is contained in:
parent
0494abc603
commit
d53dc367da
@ -194,7 +194,7 @@ std::ostream& HTTPClientSession::sendRequest(HTTPRequest& request)
|
||||
_pResponseStream = 0;
|
||||
|
||||
bool keepAlive = getKeepAlive();
|
||||
if ((connected() && !keepAlive) || mustReconnect())
|
||||
if (((connected() && !keepAlive) || mustReconnect()) && !_host.empty())
|
||||
{
|
||||
close();
|
||||
_mustReconnect = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user