1
0
mirror of https://github.com/danog/amp.git synced 2024-11-27 04:24:42 +01:00

Stop watchers in EvLoop::__destruct() to avoid segfault

This commit is contained in:
Aaron Piotrowski 2017-01-05 17:38:33 -06:00
parent 9706815714
commit 3e0cd85b67

View File

@ -79,7 +79,13 @@ class EvLoop extends Loop {
$callback($watcher->id, $watcher->value, $watcher->data);
};
}
public function __destruct() {
foreach ($this->events as $event) {
$event->stop();
}
}
/**
* {@inheritdoc}
*/