diff --git a/CHANGELOG-2.0.md b/CHANGELOG-2.0.md index 7333c8499..863776571 100644 --- a/CHANGELOG-2.0.md +++ b/CHANGELOG-2.0.md @@ -3,6 +3,7 @@ ## Fixed - [#3047](https://github.com/hyperf/hyperf/pull/3047) Fixed bug that renew sid in all namespaces failed. +- [#3087](https://github.com/hyperf/hyperf/pull/3087) Fixed memory leak when using pipeline sometimes. # v2.0.25 - 2020-12-28 diff --git a/src/utils/src/Pipeline.php b/src/utils/src/Pipeline.php index 09e03d68f..e12030734 100644 --- a/src/utils/src/Pipeline.php +++ b/src/utils/src/Pipeline.php @@ -100,7 +100,7 @@ class Pipeline */ protected function prepareDestination(Closure $destination): Closure { - return function ($passable) use ($destination) { + return static function ($passable) use ($destination) { return $destination($passable); }; }