adapt to h2 0.10.0 API

This commit is contained in:
Hannes Mehnert 2023-03-21 20:33:54 +01:00
parent 0a5367e7c6
commit c2043fd971
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ depends: [
"mirage-clock-unix" {with-test} "mirage-clock-unix" {with-test}
"mirage-crypto-rng" {with-test} "mirage-crypto-rng" {with-test}
"mirage-time-unix" {with-test} "mirage-time-unix" {with-test}
"h2" "h2" {>= "0.10.0"}
] ]
build: [ build: [
["dune" "subst"] {dev} ["dune" "subst"] {dev}

View file

@ -257,7 +257,7 @@ let single_h2_request
| `Exn e -> Error (`Msg ("Exception here: " ^ Printexc.to_string e)) in | `Exn e -> Error (`Msg ("Exception here: " ^ Printexc.to_string e)) in
wakeup err in wakeup err in
let conn = let conn =
H2.Client_connection.create ?config ?push_handler:None ~error_handler in H2.Client_connection.create ?config ?push_handler:None ~error_handler () in
let request_body = let request_body =
H2.Client_connection.request conn req ~error_handler ~response_handler in H2.Client_connection.request conn req ~error_handler ~response_handler in
Lwt.async (fun () -> Paf.run (module H2.Client_connection) conn flow) Lwt.async (fun () -> Paf.run (module H2.Client_connection) conn flow)