From 3f4a44e9fd6e048e84e60d09120d4a8ce8f75dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 12 Oct 2020 12:56:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Kafka/Kafka.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Kafka/Kafka.php b/Kafka/Kafka.php index 36a00ded..2b884e8d 100644 --- a/Kafka/Kafka.php +++ b/Kafka/Kafka.php @@ -72,6 +72,9 @@ class Kafka extends \Snowflake\Process\Process for ($i = 0; $i < $config['size'] ?? 100; $i++) { $group->add(); go(function () use ($group) { + defer(function () use ($group) { + $group->done(); + }); while ([$topic, $part, $message] = $this->channel->pop()) { $this->handlerExecute($topic, $part, $message); }