Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion async/h2_async.ml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,17 @@ module Client = struct

let request t = Client_connection.request t.connection
let ping t = Client_connection.ping t.connection
let shutdown t = Client_runtime.shutdown t.runtime

let shutdown t =
(* Do we need to shutdown the connection here? *)
Client_connection.shutdown t.connection;
Client_runtime.shutdown t.runtime

let is_closed t = Client_runtime.is_closed t.runtime

(* Under no circumstances can this return an exception! *)
let close_finished t = Client_runtime.close_finished t.runtime

module SSL = struct
module Client_runtime = Gluten_async.Client.SSL

Expand Down Expand Up @@ -176,6 +184,10 @@ module Client = struct
let ping t = Client_connection.ping t.connection
let shutdown t = Client_runtime.shutdown t.runtime
let is_closed t = Client_runtime.is_closed t.runtime

let close_finished t =
Client_runtime.close_finished t.runtime >>| fun () ->
H2.Client_connection.shutdown t.connection
end

module TLS = struct
Expand Down Expand Up @@ -223,5 +235,9 @@ module Client = struct
let ping t = Client_connection.ping t.connection
let shutdown t = Client_runtime.shutdown t.runtime
let is_closed t = Client_runtime.is_closed t.runtime

let close_finished t =
Client_runtime.close_finished t.runtime >>| fun () ->
H2.Client_connection.shutdown t.connection
end
end
1 change: 1 addition & 0 deletions async/h2_async_intf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,5 @@ module type Client = sig

val shutdown : _ t -> unit Deferred.t
val is_closed : _ t -> bool
val close_finished : _ t -> unit Deferred.t
end