From 0c45cf17b2a1f3c9958c027c4c49c53e21fe7294 Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 28 Jun 2023 12:51:43 +0000 Subject: [PATCH] empty timeout should be unlimited, not immediate death --- core/send_event.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/send_event.php b/core/send_event.php index 781e1c73..33eed65f 100644 --- a/core/send_event.php +++ b/core/send_event.php @@ -103,7 +103,11 @@ $_shm_timeout = null; function shm_set_timeout(?int $timeout=null): void { global $_shm_timeout; - $_shm_timeout = ftime() + $timeout; + if ($timeout) { + $_shm_timeout = ftime() + $timeout; + } else { + $_shm_timeout = null; + } set_time_limit(is_null($timeout) ? 0 : $timeout); }