get_CurrentServerTime NRE

Hi, we are getting null reference exceptions when RedisServerEvents is calling CurrentServerTime . Any idea?

System.NullReferenceException: Object reference not set to an instance of an object.
at ServiceStack.Redis.RedisPubSubServer.get_CurrentServerTime() at offset 0
at ServiceStack.RedisServerEvents.<>c__DisplayClass48_0.<StoreSubscriptionInfo>b__0(ServiceStack.Redis.IRedisClient r) at offset 0
at ServiceStack.RedisServerEvents.StoreSubscriptionInfo(ServiceStack.Redis.IRedisClient redis, ServiceStack.SubscriptionInfo info) at offset 57
at ServiceStack.RedisServerEvents.Register(ServiceStack.IEventSubscription sub, System.Collections.Generic.Dictionary`2 connectArgs) at offset 33
at ServiceStack.ServerEventsHandler.ProcessRequestAsync(ServiceStack.Web.IRequest req, ServiceStack.Web.IResponse res, System.String operationName) at offset 1132
at ServiceStack.Host.Handlers.HttpAsyncTaskHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback cb, System.Object extraData) at offset 13
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at offset 261
at System.Web.HttpApplication.ExecuteStepImpl(System.Web.IExecutionStep step) at offset 100
at System.Web.HttpApplication.ExecuteStep(System.Web.IExecutionStep step, System.Boolean& completedSynchronously) at offset 62

The only thing that could be null is the Stopwatch:

But that gets populated on initialized so the only way that should be able to throw an NRE is if CurrentServerTime is called before RedisPubServer is initialized which shouldn’t happen, anyway I’ve initialized it in the constructor which should prevent this NRE from happening in this commit. This change is available from v5.5.1+ that’s now available on MyGet.