@@ -23,12 +23,9 @@ module Sender = struct
2323
2424 let send t (r : Response.t ) : unit Fiber.t =
2525 Fiber. of_thunk (fun () ->
26- if t.called then
27- Code_error. raise " cannot send response twice" []
28- else if not (Id. equal t.for_ r.id) then
29- Code_error. raise " invalid id" []
30- else
31- t.called < - true ;
26+ if t.called then Code_error. raise " cannot send response twice" []
27+ else if not (Id. equal t.for_ r.id) then Code_error. raise " invalid id" []
28+ else t.called < - true ;
3229 t.send r)
3330end
3431
@@ -122,8 +119,7 @@ struct
122119
123120 let stop_pending_requests t =
124121 Fiber. of_thunk (fun () ->
125- if t.pending_requests_stopped then
126- Fiber. return ()
122+ if t.pending_requests_stopped then Fiber. return ()
127123 else (
128124 t.pending_requests_stopped < - true ;
129125 let to_cancel =
@@ -132,8 +128,7 @@ struct
132128 in
133129 Id.Table. clear t.pending;
134130 Fiber. parallel_iter to_cancel ~f: (fun ivar ->
135- Fiber.Ivar. fill ivar (Error `Stopped ))
136- ))
131+ Fiber.Ivar. fill ivar (Error `Stopped ))))
137132
138133 let create ?(on_request = on_request_fail)
139134 ?(on_notification = on_notification_fail) ~name chan state =
@@ -214,8 +209,7 @@ struct
214209 Fiber. map_reduce_errors
215210 (module Stdune.Monoid. Unit )
216211 ~on_error: (fun exn_bt ->
217- if ! sent then
218- (* TODO log *)
212+ if ! sent then (* TODO log *)
219213 Fiber. return ()
220214 else
221215 let response = response_of_exn r.id exn_bt in
0 commit comments