Skip to content

fix for localhost redis fallback logic#394

Open
wfairclough wants to merge 1 commit intobrave:masterfrom
wfairclough:patch-1
Open

fix for localhost redis fallback logic#394
wfairclough wants to merge 1 commit intobrave:masterfrom
wfairclough:patch-1

Conversation

@wfairclough
Copy link

@wfairclough wfairclough commented Feb 14, 2026

Fix the Redis fallback logic in ‎NewRedisClient. When ‎REDIS_URL is empty, ‎strings.Split("", ",") returns ‎[]string{""} (length 1), so the old ‎len(addrs) == 0 check never triggered the localhost fallback. This moves the empty check before the split so the fallback to ‎localhost:6379 works correctly.

Also fixes a typo in Redis default port number (‎6397 -> ‎6379).

In Go `strings.Split("", ",")` returns `[]string{""}` of len == 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant