Conversation
|
I've never actually tried this myself, but does Haven't looked at your code however yet. |
|
Same question as @rgrinberg: the convention in Lwt is to raise |
|
Okay, I've done more testings. The problem with |
|
You're probably aware of this, but perhaps Which reminds me that we need to make cleanup exception safe as well. |
|
Yes but for this to work, you need to be able to cancel a thread below the I'm talking about this piece of code: https://github.com/mirage/ocaml-cohttp/blob/master/lwt-core/cohttp_lwt.ml#L69 |
|
Good point. The interface absolutely should not depend on the Gc cleaning up the file descriptors. |
|
I'm think I'm running into this as well, with a Cohttp server ending up with thousands of |
|
A small repro case would be appreciated. The GC shouldn't have to clean up fds to prevent a leak indeed. |
|
I removed my previous comments because I'm not sure the problem I'm seeing is related. I have an example here which seems to never free client connections: and a potential fix/patch here: If the patch looks appropriate I'll submit a pull request. With this patch an internal system of ours which was previously accumulating 10k+ connections/day is now running without any leaked connections. |
|
This has become out of date, feel free to send a new PR if needed. |
I was writing code to handle HTTP audio streams so I needed a
abortAPI. This is a quick and dirty implementation. Would you guys be interested by a clean one? If so, how do you think it should/could be done?