Unsubscribe not working
mischa71lab opened this issue · 2 comments
mischa71lab commented
Hi,
I am using a static pipelinefactory in a dotnet core webapi.
.Exists and Unsubscribe dont seem to be working at all.
Everytime i check and unsubscibe in the constructor but it just keeps adding handlers
Any idea?
public DashboardHub(
//PubSubService pubSubService,
DashboardsService dashboardsService,
IPubSubPipelineFactory pubSubPipelineFactory,
IMemoryCache cache)
{
//_pubSubService = pubSubService;
_dashboardsService = dashboardsService;
_pubSubPipelineFactory = pubSubPipelineFactory;
_cache = cache;
if (_pubSubPipelineFactory.GetSubscriber().Exists<OrderDto>(this, OrderDtoChangedHandler))
{
// never hits this spot
}
if (_pubSubPipelineFactory.GetSubscriber().Exists<OrderDto>(this))
{
// never hits this spot
}
_pubSubPipelineFactory.GetSubscriber().Subscribe<OrderDto>(this, OrderDtoChangedHandler);
//works ok
}
Jenuce commented
Yes,unsubscribe can't working. me too
kevmoens commented
I had an issue with unsubscribing to Func<T, Task>.