Skip to content

Commit 3255491

Browse files
5.3 backward compatibility for ->timersGc
1 parent d39e57d commit 3255491

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/React/EventLoop/LibEventLoop.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ protected function addTimerInternal($interval, $callback, $periodic = false)
171171
);
172172

173173
$timer->signature = spl_object_hash($timer);
174-
175-
$callback = function () use ($timer) {
176-
foreach ($this->timersGc as $resource) {
174+
$timersGc = $this->timersGc;
175+
$callback = function () use ($timer, $timersGc) {
176+
foreach ($timersGc as $resource) {
177177
event_free($resource);
178178
}
179179
if ($timer->cancelled === false) {

0 commit comments

Comments
 (0)