Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
chaz6chez committed Jun 27, 2024
1 parent 8d7f89a commit e3dfad7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/PushServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static function getConfig(string $key, mixed $default = null, bool $getBa
public function onWorkerStart(): void
{
// 通道订阅
ChannelMethods::subscribe();
static::subscribe();
// 心跳设置
if ($this->_heartbeatTimer > 0) {
$this->_heartbeatTimer = Timer::add($this->_keepaliveTimeout / 2, function () {
Expand Down Expand Up @@ -131,7 +131,7 @@ public function onWorkerStop(): void{
Timer::del($this->_heartbeatTimer);
$this->_heartbeatTimer = 0;
}
ChannelMethods::close();
static::close();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/ChannelMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static function wildcard(string $rule, string $input): bool
*/
public static function connect(string $redisChannel = 'server-channel'): Client
{
if (!self::$_redisClients[$redisChannel] ?? null) {
if (!(self::$_redisClients[$redisChannel] ?? null)) {
if (!$config = config('redis')["plugin.workbunny.webman-push-server.$redisChannel"] ?? []) {
throw new \InvalidArgumentException("Redis channel [$redisChannel] not found. ");
}
Expand Down

0 comments on commit e3dfad7

Please sign in to comment.