1
0
mirror of https://github.com/redis/go-redis.git synced 2025-09-05 20:24:00 +03:00

update example and tests, drop connectionAdapter

This commit is contained in:
Nedyalko Dyakov
2025-08-22 19:48:45 +03:00
parent 30fceb81b4
commit bfca15a9c5
13 changed files with 187 additions and 87 deletions

View File

@@ -1077,6 +1077,7 @@ func (c *Client) pubSub() *PubSub {
// will return nil if already initialized
err = c.initConn(ctx, cn)
if err != nil {
internal.Logger.Printf(ctx, "pubsub: conn[%d] to ADDR %s [usable, handoff] = [%v, %v] after initConn returned %v", cn.GetID(), addr, cn.IsUsable(), cn.ShouldHandoff(), err)
_ = cn.Close()
return nil, err
}
@@ -1277,7 +1278,7 @@ func (c *baseClient) pushNotificationHandlerContext(cn *pool.Conn) push.Notifica
return push.NotificationHandlerContext{
Client: c,
ConnPool: c.connPool,
Conn: &connectionAdapter{conn: cn}, // Wrap in adapter for easier interface access
Conn: cn, // Wrap in adapter for easier interface access
}
}