Backport changes from proxy.
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
|
||||
SinglePoolStrategy::SinglePoolStrategy(const Url *url, int retryPause, IStrategyListener *listener, bool quiet) :
|
||||
m_active(false),
|
||||
m_release(false),
|
||||
m_listener(listener)
|
||||
{
|
||||
m_client = new Client(0, Platform::userAgent(), this);
|
||||
@@ -42,7 +41,7 @@ SinglePoolStrategy::SinglePoolStrategy(const Url *url, int retryPause, IStrategy
|
||||
|
||||
SinglePoolStrategy::~SinglePoolStrategy()
|
||||
{
|
||||
delete m_client;
|
||||
m_client->deleteLater();
|
||||
}
|
||||
|
||||
|
||||
@@ -58,13 +57,6 @@ void SinglePoolStrategy::connect()
|
||||
}
|
||||
|
||||
|
||||
void SinglePoolStrategy::release()
|
||||
{
|
||||
m_release = true;
|
||||
m_client->disconnect();
|
||||
}
|
||||
|
||||
|
||||
void SinglePoolStrategy::resume()
|
||||
{
|
||||
if (!isActive()) {
|
||||
@@ -89,11 +81,6 @@ void SinglePoolStrategy::tick(uint64_t now)
|
||||
|
||||
void SinglePoolStrategy::onClose(Client *client, int failures)
|
||||
{
|
||||
if (m_release) {
|
||||
delete this;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isActive()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user