ocaml-h2 icon indicating copy to clipboard operation
ocaml-h2 copied to clipboard

Do cleanup in examples

Open reynir opened this issue 1 year ago • 1 comments

In the (client) examples resource cleanups is not done properly. That is, file descriptors are not closed once a request has been made. You could say it is okay as the operating system will do the cleanup at exit, but in my opinion I think it is crucial to show how to do proper resource cleanup in the example as well.

Please correct me if I am mistaken.

reynir avatar Jan 05 '24 13:01 reynir

I believe you're correct, and we should be calling Client.shutdown. Thanks for the catch.

anmonteiro avatar Jan 05 '24 16:01 anmonteiro