Skip to content

Getaddrinfo raises error on some backends #351

Open
@patricoferris

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.

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions