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

fix nil listener

This commit is contained in:
Nedyalko Dyakov
2025-10-17 14:07:26 +03:00
parent 0e10cd7cd2
commit afba8c285f
4 changed files with 47 additions and 29 deletions

View File

@@ -373,11 +373,14 @@ func (c *baseClient) initConn(ctx context.Context, cn *pool.Conn) error {
username, password := "", ""
if c.opt.StreamingCredentialsProvider != nil {
credListener := c.streamingCredentialsManager.Listener(
credListener, err := c.streamingCredentialsManager.Listener(
cn,
c.reAuthConnection(),
c.onAuthenticationErr(),
)
if err != nil {
return fmt.Errorf("failed to create credentials listener: %w", err)
}
credentials, unsubscribeFromCredentialsProvider, err := c.opt.StreamingCredentialsProvider.
Subscribe(credListener)