···9898 None
9999100100let close_fd fd =
101101- Eio.Private.Trace.with_span "close" (fun () -> Unix.close fd)
101101+ Eio.Private.Trace.with_span "close" (fun () ->
102102+ try
103103+ Unix.close fd
104104+ with Unix.Unix_error (ECONNRESET, _, _) ->
105105+ (* For FreeBSD. See https://github.com/ocaml-multicore/eio/issues/786 *)
106106+ ()
107107+ )
102108103109(* Note: we could simplify this a bit by incrementing [t.ops], as [remove] does.
104110 However, that makes dscheck too slow. *)