Skip to content

Switch back cohttp-async expert response to use reader#842

Merged
rgrinberg merged 1 commit intomirage:masterfrom
anuragsoni:use-reader-for-expert-response-async
Jan 16, 2022
Merged

Switch back cohttp-async expert response to use reader#842
rgrinberg merged 1 commit intomirage:masterfrom
anuragsoni:use-reader-for-expert-response-async

Conversation

@anuragsoni
Copy link
Copy Markdown
Contributor

@anuragsoni anuragsoni commented Jan 16, 2022

This allows us to remove Input_channel from the public api altogether. One interesting change here is the change in behavior in the server module where we no longer attempt to continue the server loop after the user provided Expert handler returns. I think this behavior is okay for use-cases where the expert handler is used for connection upgrades (web sockets etc), and I am not sure if there are other common uses of the expert response_action outside of connection upgrades.

With this change I think we'll maintain compatibility with any existing cohttp-async consumer that was using the expert response (ex: for websockets), so I think the additional complication of performing the conversion to a reader, and the switch in behavior of not attempting to continue the server loop after the expert handler returns is worth it

Copy link
Copy Markdown
Member

@rgrinberg rgrinberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Will merge once CI approves.

@rgrinberg rgrinberg merged commit 5d40bc9 into mirage:master Jan 16, 2022
@anuragsoni anuragsoni deleted the use-reader-for-expert-response-async branch January 16, 2022 16:48
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

Successfully merging this pull request may close these issues.

2 participants