Backport changes from proxy.
This commit is contained in:
parent
ff68840220
commit
8aa73318c8
9 changed files with 80 additions and 61 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue