Refactor the dispatcher. Split the logic for responding from the logic for dispatching and make sure that responses happen only AFTER the request lifecycle dispose has completed, rather than in parallel.
Tip: take a look at the test snapshot file, it will help you a lot with the review.
Refactor the dispatcher. Split the logic for responding from the logic for dispatching and make sure that responses happen only AFTER the request lifecycle dispose has completed, rather than in parallel.
Tip: take a look at the test snapshot file, it will help you a lot with the review.