Skip to content

Commit 24d4a2d

Browse files
authored
Merge pull request #2231 from j178/fix-pubsub
fix(pubsub): fix break introduced by #2177
2 parents eae349a + fea57be commit 24d4a2d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

commands.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ type Cmdable interface {
352352
PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
353353
PubSubNumPat(ctx context.Context) *IntCmd
354354
PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd
355-
PubSubShardNumSub(ctx context.Context, channels ...string) *StringIntMapCmd
355+
PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
356356

357357
ClusterSlots(ctx context.Context) *ClusterSlotsCmd
358358
ClusterNodes(ctx context.Context) *StringCmd
@@ -3122,14 +3122,14 @@ func (c cmdable) PubSubShardChannels(ctx context.Context, pattern string) *Strin
31223122
return cmd
31233123
}
31243124

3125-
func (c cmdable) PubSubShardNumSub(ctx context.Context, channels ...string) *StringIntMapCmd {
3125+
func (c cmdable) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd {
31263126
args := make([]interface{}, 2+len(channels))
31273127
args[0] = "pubsub"
31283128
args[1] = "shardnumsub"
31293129
for i, channel := range channels {
31303130
args[2+i] = channel
31313131
}
3132-
cmd := NewStringIntMapCmd(ctx, args...)
3132+
cmd := NewMapStringIntCmd(ctx, args...)
31333133
_ = c(ctx, cmd)
31343134
return cmd
31353135
}

ring.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ func (c *Ring) SSubscribe(ctx context.Context, channels ...string) *PubSub {
565565
if len(channels) == 0 {
566566
panic("at least one channel is required")
567567
}
568-
shard, err := c.shards.GetByKey(channels[0])
568+
shard, err := c.sharding.GetByKey(channels[0])
569569
if err != nil {
570570
// TODO: return PubSub with sticky error
571571
panic(err)

0 commit comments

Comments
 (0)