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

Cohttp-lwt, Server: How should we now close `Expert response_action? #990

Open
pirbo opened this issue Jul 12, 2023 · 2 comments
Open

Cohttp-lwt, Server: How should we now close `Expert response_action? #990

pirbo opened this issue Jul 12, 2023 · 2 comments

Comments

@pirbo
Copy link
Contributor

pirbo commented Jul 12, 2023

Type Cohttp.S.IO.ic is now abstract and (as far as I can see) there is no function provided to "close" one. Therefore either

{!unit Lwt.t} is resolved. The connection can be closed by closing the
{!IO.ic}. *)

is not anymore the way to go and the comment needs an update or we need a way to do the recommended action :-)

Note that in any case, this introduce a breaking change as existing code using cohttp.5 has some Lwt_io.close ic that doesn't type anymore. (Discovered by testing the compatibility of https://gitlab.com/nomadic-labs/resto with cohttp.6)

@mseri
Copy link
Collaborator

mseri commented Sep 15, 2023

I would go with your second suggestion, do you have a suggestion on how to re-introduce it?

@mseri
Copy link
Collaborator

mseri commented Sep 15, 2023

In cohttp-lwt-unix the Input_channel has a close function, perhaps we could make that a requirement from the signature?

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

No branches or pull requests

2 participants