Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 373d363

Browse files
committed
Allow specifying Uri with password only
1 parent 530588a commit 373d363

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ServiceStack.Redis/RedisClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public RedisClient(string host, int port, string password = null, long db = Defa
6969
public RedisClient(Uri uri)
7070
: base(uri.Host, uri.Port)
7171
{
72-
var password = !String.IsNullOrEmpty(uri.UserInfo) ? uri.UserInfo.Split(':')[1] : null;
72+
var password = !string.IsNullOrEmpty(uri.UserInfo) ? uri.UserInfo.Split(':').Last() : null;
7373
Password = password;
7474
Init();
7575
}

0 commit comments

Comments
 (0)