mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-16 06:56:41 +02: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;
|
_pResponseStream = 0;
|
||||||
|
|
||||||
bool keepAlive = getKeepAlive();
|
bool keepAlive = getKeepAlive();
|
||||||
if ((connected() && !keepAlive) || mustReconnect())
|
if (((connected() && !keepAlive) || mustReconnect()) && !_host.empty())
|
||||||
{
|
{
|
||||||
close();
|
close();
|
||||||
_mustReconnect = false;
|
_mustReconnect = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user