1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-23 21:01:00 +03:00

fix build

This commit is contained in:
Nedyalko Dyakov
2025-04-22 22:42:18 +03:00
parent 5fac913204
commit 2a97f2e49c
3 changed files with 38 additions and 15 deletions

View File

@ -394,7 +394,7 @@ func (c *baseClient) initConn(ctx context.Context, cn *pool.Conn) error {
// or it could be DragonflyDB or a third-party redis-proxy. They all respond
// with different error string results for unsupported commands, making it
// difficult to rely on error strings to determine all results.
return fmt.Errorf("failed to initialize connection: %w", err)
return err
} else if password != "" {
// Try legacy AUTH command if HELLO failed
err = c.reAuthConnection(ctx, conn)(auth.NewBasicCredentials(username, password))
@ -434,7 +434,7 @@ func (c *baseClient) initConn(ctx context.Context, cn *pool.Conn) error {
// Handle network errors (e.g. timeouts) in CLIENT SETINFO to avoid
// out of order responses later on.
if _, err = p.Exec(ctx); err != nil && !isRedisError(err) {
return fmt.Errorf("failed to set client identity: %w", err)
return err
}
}