File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -264,10 +264,12 @@ public function adaptiveTimerDelete(?string $id = null): void
264264 }
265265 if ($ id === null ) {
266266 foreach (self ::$ timerIdMap as $ id ) {
267- if (is_worker_version_5 () and method_exists (Worker::$ globalEvent , 'offDelay ' )) {
268- Worker::$ globalEvent ->offDelay ($ id );
269- } else {
270- Worker::$ globalEvent ->del ($ id , EventInterface::EV_TIMER );
267+ if (is_int ($ id )) {
268+ if (is_worker_version_5 () and method_exists (Worker::$ globalEvent , 'offDelay ' )) {
269+ Worker::$ globalEvent ->offDelay ($ id );
270+ } else {
271+ Worker::$ globalEvent ->del ($ id , EventInterface::EV_TIMER );
272+ }
271273 }
272274 }
273275 self ::$ timerIdMap = [];
@@ -282,4 +284,4 @@ public function adaptiveTimerDelete(?string $id = null): void
282284 }
283285 }
284286 }
285- }
287+ }
You can’t perform that action at this time.
0 commit comments