Changeset

11903:baf69f254753

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.
author Kim Alvefur <zash@zash.se>
date Sat, 13 Nov 2021 13:32:43 +0100
parents 11902:98fd531594bd
children 11904:313d01cc4258
files net/connect.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/connect.lua	Fri Nov 12 22:34:04 2021 +0100
+++ b/net/connect.lua	Sat Nov 13 13:32:43 2021 +0100
@@ -37,7 +37,7 @@
 			-- 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