true
let remove_watch_callback conn watch =
- conn.watches <- List.filter (fun w -> w <> watch) conn.watches
+ conn.watches <- List.filter (fun w -> w != watch) conn.watches
let remove_timeout_callback conn timeout =
(* Scan both lists to increase robustness (instead
of using the timeout state to select the list). *)
let updated_timeouts =
List.fold_left (fun acc (t, h) ->
- if t = timeout then begin
+ if t == timeout then begin
Eventloop.cancel_timer conn.ev_loop h;
acc
end else
) [] conn.timeouts
in
conn.timeouts <- updated_timeouts;
- conn.inactive_timeouts <- List.filter (fun t -> t <> timeout) conn.inactive_timeouts
+ conn.inactive_timeouts <- List.filter (fun t -> t != timeout) conn.inactive_timeouts
let timeout_handler conn timeout () =
(* We cannot use remove_timeout_callback here since the
eventloop handle is now invalid. *)
let updated_timeouts =
List.fold_left (fun acc (t,h) ->
- if t = timeout then acc else (t,h) :: acc
+ if t == timeout then acc else (t,h) :: acc
) [] conn.timeouts
in
conn.timeouts <- updated_timeouts;