diff options
author | Kim Alvefur <zash@zash.se> | 2021-11-13 13:32:43 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-11-13 13:32:43 +0100 |
commit | 068388d9c721b38d6a5643c1cdea9b1d5d9b5494 (patch) | |
tree | 2ad6102aceb1586ad5195dd7dedcb1461c83e8db /net/connect.lua | |
parent | 256466cd33ec6a8fde21915c8b9795393419c14f (diff) | |
download | prosody-068388d9c721b38d6a5643c1cdea9b1d5d9b5494.tar.gz prosody-068388d9c721b38d6a5643c1cdea9b1d5d9b5494.zip |
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.
Diffstat (limited to 'net/connect.lua')
-rw-r--r-- | net/connect.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |