Open
Description
It seems that luv raises an exception instead of returning an empty list.
open Eio
let lookup net hostname =
match Net.getaddrinfo_stream net hostname with
| [] -> ()
| _ -> assert false
let () =
let hostname = "blahblahblah.tarides.com" in
(assert (Unix.getaddrinfo hostname "" [] = []));
Eio_main.run (fun env -> lookup env#net hostname)
This returns:
Fatal error: exception Eio_luv.Luv_error(EAI_NONAME) (* unknown node or service *)
I can't currently run this properly on Linux with Uring but I'm assuming it returns []
because Unix.getaddrinfo
does.