Eio network backends and test helpers
0

Configure Feed

Select the types of activity you want to include in your feed.

eio-net: report reset-class writev errors the Eio way

EPIPE and ECONNRESET from the offload write now raise the same
Connection_reset the inline path reports, so callers keep one error
vocabulary and need no Unix of their own.

+9 -4
+9 -4
lib/unix/eio_net_unix.ml
··· 88 88 in 89 89 let rec attempt () = 90 90 let wrote = 91 - Eio_unix.Fd.use_exn "Eio_net_unix.Stream.offload_single_write" fd 92 - (fun unix_fd -> 93 - Eio_unix.run_in_systhread ~label:"eio-net-writev" (fun () -> 94 - writev unix_fd iov)) 91 + try 92 + Eio_unix.Fd.use_exn "Eio_net_unix.Stream.offload_single_write" fd 93 + (fun unix_fd -> 94 + Eio_unix.run_in_systhread ~label:"eio-net-writev" (fun () -> 95 + writev unix_fd iov)) 96 + with Unix.Unix_error (((EPIPE | ECONNRESET) as code), name, arg) -> 97 + raise 98 + (Eio.Net.err 99 + (Connection_reset (Eio_unix.Unix_error (code, name, arg)))) 95 100 in 96 101 if wrote >= 0 then wrote 97 102 else begin