From 0f8c6b415d10a6c993717aff760c8407fec8dd17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 17 Jan 2018 18:59:34 +0100 Subject: [PATCH] Properly clean up event watchers for ext-event and ext-libev --- src/ExtEventLoop.php | 2 +- src/ExtLibevLoop.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ExtEventLoop.php b/src/ExtEventLoop.php index 1bf35605..9db1de9d 100644 --- a/src/ExtEventLoop.php +++ b/src/ExtEventLoop.php @@ -57,7 +57,7 @@ function ($signal) { }, function ($signal) { if ($this->signals->count($signal) === 0) { - $this->signalEvents[$signal]->del(); + $this->signalEvents[$signal]->free(); unset($this->signalEvents[$signal]); } } diff --git a/src/ExtLibevLoop.php b/src/ExtLibevLoop.php index 06da125b..58e75b9f 100644 --- a/src/ExtLibevLoop.php +++ b/src/ExtLibevLoop.php @@ -55,6 +55,7 @@ function ($signal) { }, function ($signal) { if ($this->signals->count($signal) === 0) { + $this->signalEvents[$signal]->stop(); $this->loop->remove($this->signalEvents[$signal]); unset($this->signalEvents[$signal]); } @@ -100,6 +101,7 @@ public function removeReadStream($stream) if (isset($this->readEvents[$key])) { $this->readEvents[$key]->stop(); + $this->loop->remove($this->readEvents[$key]); unset($this->readEvents[$key]); } } @@ -110,6 +112,7 @@ public function removeWriteStream($stream) if (isset($this->writeEvents[$key])) { $this->writeEvents[$key]->stop(); + $this->loop->remove($this->writeEvents[$key]); unset($this->writeEvents[$key]); } } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy