From 96b6f68b237669826e9c39d9216f176f12b78fd3 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 7 Dec 2021 21:43:36 +0100 Subject: net.resolvers: Report when hostname fails IDNA Not a particularly user-friendly error message, but better than "unable to resolve service" and having no clue where it came from. --- net/resolvers/basic.lua | 2 +- net/resolvers/service.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'net') diff --git a/net/resolvers/basic.lua b/net/resolvers/basic.lua index b62440e1..495a348e 100644 --- a/net/resolvers/basic.lua +++ b/net/resolvers/basic.lua @@ -23,7 +23,7 @@ function methods:next(cb) end if not self.hostname then - -- FIXME report IDNA error + self.last_error = "hostname failed IDNA"; cb(nil); return; end diff --git a/net/resolvers/service.lua b/net/resolvers/service.lua index 4988f423..b476cb2c 100644 --- a/net/resolvers/service.lua +++ b/net/resolvers/service.lua @@ -34,7 +34,7 @@ function methods:next(cb) end if not self.hostname then - -- FIXME report IDNA error + self.last_error = "hostname failed IDNA"; cb(nil); return; end -- cgit v1.2.3