Merge pull request 'Fix a leak of fd from h2 - we must shutdown the connection to really close the fd' (#6) from fix-h2-leak into main
Reviewed-on: https://git.robur.io/robur/opam-mirror/pulls/6
This commit is contained in:
commit
c665bb23fb
1 changed files with 2 additions and 1 deletions
|
@ -219,7 +219,8 @@ let single_h2_request ~sleep ?config ~scheme flow user_pass host meth path heade
|
||||||
Lwt.async (fun () -> Paf.run (module H2.Client_connection) ~sleep conn flow) ;
|
Lwt.async (fun () -> Paf.run (module H2.Client_connection) ~sleep conn flow) ;
|
||||||
Option.iter (H2.Body.Writer.write_string request_body) body ;
|
Option.iter (H2.Body.Writer.write_string request_body) body ;
|
||||||
H2.Body.Writer.close request_body ;
|
H2.Body.Writer.close request_body ;
|
||||||
finished
|
finished >|= fun v ->
|
||||||
|
H2.Client_connection.shutdown conn ; v
|
||||||
|
|
||||||
let decode_uri ~ctx uri =
|
let decode_uri ~ctx uri =
|
||||||
let ( >>= ) = Result.bind in
|
let ( >>= ) = Result.bind in
|
||||||
|
|
Loading…
Reference in a new issue