Skip to content

Commit

Permalink
fixup! CP-48195: Improvements to tracing_export
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Buica <[email protected]>
  • Loading branch information
GabrielBuica committed Apr 19, 2024
1 parent d7e550b commit ee9906b
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions ocaml/libs/tracing/tracing_export.ml
Original file line number Diff line number Diff line change
Expand Up @@ -231,19 +231,8 @@ module Destination = struct
when Cohttp.Code.(response.status |> code_of_status |> is_error)
->
Error (Failure (Cohttp.Code.string_of_status response.status))
| `Ok response ->
let body = Buffer.create 128 in
let reader = Response.make_body_reader response ic in
let rec loop () =
match Response.read_body_chunk reader with
| Cohttp.Transfer.Chunk x ->
Buffer.add_string body x ; loop ()
| Cohttp.Transfer.Final_chunk x ->
Buffer.add_string body x
| Cohttp.Transfer.Done ->
()
in
loop () ; Ok ()
| `Ok _ ->
Ok ()
)
with e -> Error e
end
Expand Down

0 comments on commit ee9906b

Please sign in to comment.