Fixed wrong keys names.

This commit is contained in:
Alex Renoki 2020-09-03 07:04:05 +03:00
parent 9938cf6ae2
commit ebfab2efd0
1 changed files with 2 additions and 2 deletions

View File

@ -161,7 +161,7 @@ class RedisClient extends LocalClient
// If we no longer have subscriptions to that channel, unsubscribe // If we no longer have subscriptions to that channel, unsubscribe
if ($this->subscribedChannels["{$appId}:{$channel}"] < 1) { if ($this->subscribedChannels["{$appId}:{$channel}"] < 1) {
$this->subscribeClient->__call('unsubscribe', ["{$appId}:{$channel}"]); $this->subscribeClient->__call('unsubscribe', [$this->getTopicName($appId, $channel)]);
unset($this->subscribedChannels["{$appId}:{$channel}"]); unset($this->subscribedChannels["{$appId}:{$channel}"]);
} }
@ -187,7 +187,7 @@ class RedisClient extends LocalClient
*/ */
public function joinChannel($appId, string $channel, string $socketId, string $data) public function joinChannel($appId, string $channel, string $socketId, string $data)
{ {
$this->publishClient->__call('hset', ["{$appId}:{$channel}", $socketId, $data]); $this->publishClient->__call('hset', [$this->getTopicName($appId, $channel), $socketId, $data]);
DashboardLogger::log($appId, DashboardLogger::TYPE_REPLICATOR_JOINED_CHANNEL, [ DashboardLogger::log($appId, DashboardLogger::TYPE_REPLICATOR_JOINED_CHANNEL, [
'channel' => $channel, 'channel' => $channel,