Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsubscribe not working #33

Open
mischa71lab opened this issue May 29, 2020 · 2 comments
Open

Unsubscribe not working #33

mischa71lab opened this issue May 29, 2020 · 2 comments

Comments

@mischa71lab
Copy link

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
Copy link

Jenuce commented Jan 11, 2021

Yes,unsubscribe can't working. me too

@kevmoens
Copy link
Contributor

I had an issue with unsubscribing to Func<T, Task>.

upta added a commit that referenced this issue Nov 19, 2021
Issue #33 Unsubscribe is failing.  Allow Action<T> or Func<T, Task>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants