This commit is contained in:
as2252258@163.com
2021-05-02 05:29:32 +08:00
parent c67156ce2d
commit 6fffb8988a
+1 -3
View File
@@ -76,9 +76,7 @@ class Channel extends Component
*/
public function pop(string $name, Closure $closure): mixed
{
if (($channel = $this->channelInit($name)) == false) {
return $this->addError('Channel is full.');
}
$channel = $this->channelInit($name);
if ($channel->isEmpty()) {
return call_user_func($closure);
}