I am using servicestack for my redisclient in my class. I have one redis client as the following:
public class MySuperClass{
....
RedisClient client = new RedisClient("localhost", 6379);
public int MySuperProperty{get; set:}
....
}
And the following is how I use it to make sure that it is properly disposed after I use it:
private void GetInfoFromRedis(object sender, EventArgs e) {
using (client) {
client.Set<Human>("RedisKey", new Human {
Age = 29,
Height = 170,
Name = "HumanName"
});
}
}
My question is after I dispose client
if I make another request to redis using the same disposed client
, disposed client makes another connection to redis database successfully but this time the connection stays in the CLIENT LIST.