Skip to content

Commit ab6df91

Browse files
committed
fix(#12) sort function must expect multiple localhost slaves
1 parent 739d2b8 commit ab6df91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/resty/redis/connector.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ end
191191

192192

193193
local function sort_by_localhost(a, b)
194-
if a.host == "127.0.0.1" then
194+
if a.host == "127.0.0.1" and b.host ~= "127.0.0.1" then
195195
return true
196196
else
197197
return false

0 commit comments

Comments
 (0)