File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -123,11 +123,8 @@ let safe_call f write_log =
123123(* * Internal HTTP call implementation *)
124124let rec http_call_internal r write_f fretry progress =
125125 fretry () ;
126- let curl = Curl. init () in
127126 try
128- bracket curl (fun res ->
129- Curl. cleanup res
130- ) (fun _ ->
127+ bracket (Curl. init () ) Curl. cleanup begin fun curl ->
131128 Curl. set_url curl (Url. to_string r.req_url);
132129 let headers =
133130 (" User-Agent" , r.req_user_agent) ::
@@ -191,7 +188,7 @@ let rec http_call_internal r write_f fretry progress =
191188 | _ ->
192189 lprintf_nl " HTTP error unknown: %s" (Url. to_string r.req_url);
193190 Error `UnknownError
194- )
191+ end
195192 with
196193 | ScheduleRetry error ->
197194 lprintf_nl " exception" ;
You can’t perform that action at this time.
0 commit comments