Skip to content

panic: interface conversion: interface {} is *gredis.Subscription, not *gredis.Message #3333

Open
@StrangeYear

Description

@StrangeYear

(

return v.Val().(*gredis.Message), nil
)

When subscribing to the Redis message queue for the first time, this line of code will return a panic.

2024-02-27 18:19:07.007 | panic: interface conversion: interface {} is *gredis.Subscription, not *gredis.Message |  
-- | -- | --
  |   | 2024-02-27 18:19:07.007 | /data/go/pkg/mod/github.com/gogf/gf/contrib/nosql/redis/[email protected]/redis_conn.go:248 +0xd1 |  
  |   | 2024-02-27 18:19:07.007 | github.com/gogf/gf/contrib/nosql/redis/v2.(*Conn).ReceiveMessage(0x3b9aca00?, {0x319ba40?, 0x498b000?}) |  
  |   | 2024-02-27 18:19:07.007 | goroutine 75 [running]:

Metadata

Metadata

Assignees

Labels

bugIt is confirmed a bug, but don't worry, we'll handle it.need more details

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions