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

Commit e4705e2

Browse files
committed
Refactor to use renamed WaitBeforeNextRestart API
1 parent 72101c2 commit e4705e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ServiceStack.Redis/RedisPubSubServer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public class RedisPubSubServer : IRedisPubSubServer
3131
public Action<IRedisPubSubServer> OnFailover { get; set; }
3232

3333
readonly Random rand = new Random(Environment.TickCount);
34-
public int? KeepAliveRetryAfterMs { get; set; }
3534

3635
private int doOperation = Operation.NoOp;
3736

@@ -65,6 +64,7 @@ public long BgThreadCount
6564

6665
public IRedisClientsManager ClientsManager { get; set; }
6766
public string[] Channels { get; set; }
67+
public TimeSpan? WaitBeforeNextRestart { get; set; }
6868

6969
public RedisPubSubServer(IRedisClientsManager clientsManager, params string[] channels)
7070
{
@@ -307,8 +307,8 @@ private void RunLoop()
307307

308308
if (AutoRestart && Interlocked.CompareExchange(ref status, 0, 0) != Status.Disposed)
309309
{
310-
if (KeepAliveRetryAfterMs != null)
311-
Thread.Sleep(KeepAliveRetryAfterMs.Value);
310+
if (WaitBeforeNextRestart != null)
311+
Thread.Sleep(WaitBeforeNextRestart.Value);
312312

313313
Start();
314314
}

0 commit comments

Comments
 (0)