Fix/issues with running commandprocessor samples#3500
Merged
preardon merged 5 commits intoFeb 19, 2025
Merged
Conversation
…rldInternalBus otherwise MessagePump throws Unable to cast object of type 'HelloWorld.GreetingCommandHandler' to type 'Paramore.Brighter.IHandleRequestsAsync
…on RequestHandlerAsync, by only asigning the _successor if it is different to this, i.e. the current instance.
Member
|
Hi @andrewjpoole thanks. Things are in flux a bit as we push towards V10 release candidate, so the 9x branch is much more stable right now. But thanks for this PR. I'll take a look. |
There was a problem hiding this comment.
Gates Passed
6 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
DevJonny
pushed a commit
to DevJonny/Brighter
that referenced
this pull request
Feb 28, 2026
* fix: typo in CommandHandler * fix: CommandHandler should be async in samples/CommandHandler/HelloWorldInternalBus otherwise MessagePump throws Unable to cast object of type 'HelloWorld.GreetingCommandHandler' to type 'Paramore.Brighter.IHandleRequestsAsync * fix: prevent StackOverflow exception related to the _successor field on RequestHandlerAsync, by only asigning the _successor if it is different to this, i.e. the current instance. * fix: removing accidentally checked in launchsettings.json file --------- Co-authored-by: Paul Reardon <Paul@ReardonTech.UK>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I pulled down the Brighter code to explore and understand how it works, however I found some issues with the CommandProcessor samples, so here's a pr to fix them.
One was related to the _successor field of RequestHandlerAsync.cs which was being set recursively, causing a stackoverflow exception. I am not sure if my fix is the correct one or in the right place, but at least its a start!
This screenshot illustrates the issue I was seeing
