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

Events raised twice on client if events are declared as abstract events on server #481

Closed
ApotDanKre opened this issue Jun 30, 2020 · 0 comments · Fixed by #520
Closed
Assignees
Labels
Milestone

Comments

@ApotDanKre
Copy link

As already discussed with Andrew the server events are raised twice even though I invoked them only once. Happened on StreamJsonRpc.2.4.48. To reproduce this issue use an abstract class which declared the events as abstract events. The server target inherited from this base class and overwrite these events. When you now invoke the event, it will raise twice on client side. Maybe these events were somehow added to the proxy twice due to reflection.

@AArnott AArnott added the bug label Jun 30, 2020
@AArnott AArnott self-assigned this Aug 11, 2020
@AArnott AArnott added this to the v2.6 milestone Aug 11, 2020
AArnott added a commit to AArnott/vs-streamjsonrpc that referenced this issue Aug 11, 2020
Before this fix, when events were declared (as abstract or virtual) on a base class and overridden in the target object, we attached a handler to the event once for each time it was declared in the hierarchy, leading to multiple invocations on the client.

Fixes microsoft#481
@AArnott AArnott changed the title events raised twice if events are declared as abstract events Events raised twice on client if events are declared as abstract events on server Aug 11, 2020
@AArnott AArnott closed this as completed Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants