Exception details: ResponseStatus { ErrorCode: “NotFound”, Message: “Subscription QFhSkkJQX5uCNZLUyRnA does not exist”, StackTrace: null, Errors: [], Meta: null }
What do I have to hook into to stop having these constantly in my logs? Is there a handler I can look for?
every 15 minutes i called this:
((RedisServerEvents)Instance.Resolve()).UnRegisterExpiredSubscriptions();
i tried this as well (OnHeardBeatInit), but alas, it did nothing.
Plugins.Add(new ServerEventsFeature
{
OnHeartbeatInit = req =>
{
var subscriptionId = req.QueryString["id"];
var subscription = req.TryResolve<IServerEvents>().GetSubscriptionInfo(subscriptionId);
if (subscription == null)
{
//... subscription no longer exists
req.Response.Close();
}
},
OnConnect = ((subscription, dictionary) =>
{
Serilog.Log.Information("Connect from {Addr} for {User}",subscription.UserAddress,subscription.UserName);
}),
OnError = (subscription, exception) =>
{
Serilog.Log.Warning("Server event error! Message: {Message}",exception.Message);
}
,LimitToAuthenticatedUsers = true,
NotifyChannelOfSubscriptions = false,
});
container.Register<IServerEvents>(c =>
new RedisServerEvents(c.Resolve<IRedisClientsManager>()));
container.Resolve<IServerEvents>().Start();