event stopped and completed remains err

This commit is contained in:
xiaomlove
2023-09-15 03:57:42 +08:00
parent 1e700e6200
commit 6128c17aa4

View File

@@ -81,7 +81,7 @@ function err($msg)
*/
function warn($msg, int $interval = 7200)
{
if (!empty($GLOBALS['event'])) {
if (!empty($GLOBALS['event']) && in_array($GLOBALS['event'], ["completed", "stopped"])) {
//force return err, otherwise event will be lost in the next announce request
return err($msg);
}