mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
implement close connection method to free shared memory pool
This commit is contained in:
parent
ed31a3b13f
commit
5b17cf6aca
3 changed files with 20 additions and 0 deletions
|
|
@ -218,4 +218,9 @@ abstract class Connection implements \Yggverse\Yoda\Interface\Model\Connection
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function close(): void
|
||||||
|
{
|
||||||
|
$this->_pool->reset(); // @TODO
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -157,6 +157,7 @@ class Page
|
||||||
// Redirect requested
|
// Redirect requested
|
||||||
if ($location = $connection->getRedirect())
|
if ($location = $connection->getRedirect())
|
||||||
{
|
{
|
||||||
|
// Follow
|
||||||
$this->open(
|
$this->open(
|
||||||
$location
|
$location
|
||||||
);
|
);
|
||||||
|
|
@ -164,6 +165,9 @@ class Page
|
||||||
// Hide progressbar
|
// Hide progressbar
|
||||||
$this->progressbar->hide();
|
$this->progressbar->hide();
|
||||||
|
|
||||||
|
// Free shared memory pool
|
||||||
|
$connection->close();
|
||||||
|
|
||||||
return false; // stop
|
return false; // stop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -178,6 +182,9 @@ class Page
|
||||||
// Hide progressbar
|
// Hide progressbar
|
||||||
$this->progressbar->hide();
|
$this->progressbar->hide();
|
||||||
|
|
||||||
|
// Free shared memory pool
|
||||||
|
$connection->close();
|
||||||
|
|
||||||
return false; // stop
|
return false; // stop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -230,6 +237,9 @@ class Page
|
||||||
// Hide progressbar
|
// Hide progressbar
|
||||||
$this->progressbar->hide();
|
$this->progressbar->hide();
|
||||||
|
|
||||||
|
// Free shared memory pool
|
||||||
|
$connection->close();
|
||||||
|
|
||||||
// Stop
|
// Stop
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -250,6 +260,9 @@ class Page
|
||||||
// Hide progressbar
|
// Hide progressbar
|
||||||
$this->progressbar->hide();
|
$this->progressbar->hide();
|
||||||
|
|
||||||
|
// Free shared memory pool
|
||||||
|
$connection->close();
|
||||||
|
|
||||||
// Stop
|
// Stop
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,4 +76,6 @@ interface Connection
|
||||||
public function unsetRequest(): void;
|
public function unsetRequest(): void;
|
||||||
|
|
||||||
public function getLength(): ?int;
|
public function getLength(): ?int;
|
||||||
|
|
||||||
|
public function close(): void;
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue