Organisationsmirageocaml-cohttp

ocaml-cohttp

https://github.com/mirage/ocaml-cohttp
Refs Branches (2)
Fix `Connection_cache.call` hanging on unreachable server
Fix `Connection_cache.call` hanging on unreachable server * What The `Connection_cache.call` function could hang indefinitely when attempting to establish a connection to an unreachable server. This change resolves that issue by ensuring that the connection creation process is asynchronous and non-blocking. * Why Previously, the `Connection.create` function returns before the connection is established. When the returned connection is binded, something in the code of `get_connection` prevents the correct handling of the `ECONNREFUSED` Unix error. * How The `create` helper function now uses `Connection.connect` (which returns an Lwt promise) and binds its result using `>>=`. This transforms the `create` function itself into an Lwt promise. Consequently, the `Connection_cache.call` function no longer blocks on connection establishment but rather awaits the connection promise.
4e3d3f
#1113
Undo deprecation of connection value
Undo deprecation of connection value In #798 the connection value has been deprecated with the claim it is useless. However, in fact it is used at least with the Mirage backend in order to track the connections for logging etc. (See last two comments of the PR.) In over 3 years no replacement has been added, so this change removes the deprecation until some alternative exists. (Which could be possibly Mirage only.)
45a750
#1114