Fixed memory leak when using pipeline sometimes. (#3087)

* Fixed pipeline memory leak some times.

* Update CHANGELOG-2.0.md
This commit is contained in:
李铭昕 2021-01-08 13:04:56 +08:00 committed by GitHub
parent c8912644e5
commit 51f4c5e96b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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);
};
}