From 068388d9c721b38d6a5643c1cdea9b1d5d9b5494 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 13 Nov 2021 13:32:43 +0100 Subject: net.connect: Prefer last connection error over last resolver error E.g. "connection refused" over one IP version instead of NoError for the other IP version. --- net/connect.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/connect.lua b/net/connect.lua index 51c36c7b..dbdd3ce6 100644 --- a/net/connect.lua +++ b/net/connect.lua @@ -37,7 +37,7 @@ local function attempt_connection(p) -- No more targets to try p:log("debug", "No more connection targets to try", p.target_resolver.last_error); if p.listeners.onfail then - p.listeners.onfail(p.data, p.target_resolver.last_error or p.last_error or "unable to resolve service"); + p.listeners.onfail(p.data, p.last_error or p.target_resolver.last_error or "unable to resolve service"); end return; end -- cgit v1.2.3