mirror of
https://github.com/dockersamples/example-voting-app.git
synced 2026-05-08 18:46:36 +00:00
Merge pull request #89 from oherrala/redisconn
Don't lose Redis connection on reconnect
This commit is contained in:
@@ -34,7 +34,8 @@ namespace Worker
|
||||
// Reconnect redis if down
|
||||
if (redisConn == null || !redisConn.IsConnected) {
|
||||
Console.WriteLine("Reconnecting Redis");
|
||||
redis = OpenRedisConnection("redis").GetDatabase();
|
||||
redisConn = OpenRedisConnection("redis");
|
||||
redis = redisConn.GetDatabase();
|
||||
}
|
||||
string json = redis.ListLeftPopAsync("votes").Result;
|
||||
if (json != null)
|
||||
|
||||
Reference in New Issue
Block a user