Fix bug daemon on kill caused by waiting msgçread

This commit is contained in:
osaajani 2020-03-05 22:15:59 +01:00
parent 11e129a4bd
commit 42422db1c3
1 changed files with 2 additions and 2 deletions

View File

@ -57,8 +57,8 @@ class Webhook extends AbstractDaemon
$message = null;
$error_code = null;
$success = msg_receive($this->webhook_queue, QUEUE_TYPE_WEBHOOK, $msgtype, $maxsize, $message, true, 0, $error_code);
if (!$success)
$success = msg_receive($this->webhook_queue, QUEUE_TYPE_WEBHOOK, $msgtype, $maxsize, $message, true, MSG_IPC_NOWAIT, $error_code); //MSG_IPC_NOWAIT == dont wait if no message found
if (!$success && MSG_ENOMSG !== $error_code)
{
$this->logger->critical('Error for webhook queue reading, error code : ' . $error_code);
}