Finally found the horrific memory leak!

pull/655/head
n0nag0n 3 days ago
parent d43f2e9db5
commit 3d8149ad1b

@ -521,6 +521,12 @@ class Engine
if ($this->requestHandled === false) {
// not doing much here, just setting the requestHandled flag to true
$this->requestHandled = true;
// Allow filters to run
// This prevents multiple after events from being registered
$this->after('start', function () use ($self) {
$self->stop();
});
} else {
// deregister the request and response objects and re-register them with new instances
$this->unregister('request');
@ -535,11 +541,6 @@ class Engine
$response = $this->response();
$router = $this->router();
// Allow filters to run
$this->after('start', function () use ($self) {
$self->stop();
});
if ($response->v2_output_buffering === true) {
// Flush any existing output
if (ob_get_length() > 0) {

Loading…
Cancel
Save