The Wayback Machine - https://web.archive.org/web/20220114093132/https://github.com/dotnet/aspnetcore/issues/39512
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

SignalR TypeScript Client - The next event handler is not called if the previous event handler removes itself #39512

Open
1 task done
mr-fedorof opened this issue Jan 14, 2022 · 0 comments

Comments

@mr-fedorof
Copy link

@mr-fedorof mr-fedorof commented Jan 14, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The next event handler is not called if the previous event handler removes itself.

Expected Behavior

All registered event handlers have to be called.

Steps To Reproduce

const connection = new HubConnectionBuilder();

...

function emitter1() {
    connection.off(eventName, emitter1);
    console.log('emitter1');
}

function emitter2() {
    console.log('emitter2');
}

connection.on(eventName, emitter1);
connection.on(eventName, emitter2);

When the first event comes in then only emitter1 is called, but not emitter2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant