Compare commits

..

1 Commits

Author SHA1 Message Date
70047c85c3 update atomic operation
Some checks failed
automerge / automerge (pull_request) Has been skipped
dependabot-automerge / automerge (pull_request) Has been skipped
autoapprove / autoapprove (pull_request) Successful in 17s
codeql / analyze (go) (pull_request) Failing after 52s
prbuild / test (pull_request) Failing after 5m10s
prbuild / lint (pull_request) Failing after 13m58s
add using lazy connect
2024-11-26 16:54:33 +03:00

View File

@@ -770,9 +770,9 @@ func (r *Store) getKey(b *strings.Builder, mainNamespace string, opNamespace str
return b.String() return b.String()
} }
func (r *Store) connect(ctx context.Context) (err error) { func (r *Store) connect(ctx context.Context) error {
if r.isConnected.Load() == 0 { if r.isConnected.Load() == 0 {
if err = r.cli.Ping(ctx).Err(); err != nil { if err := r.cli.Ping(ctx).Err(); err != nil {
setSpanError(ctx, err) setSpanError(ctx, err)
return err return err
} }