net/connect.lua
changeset 12430 7a3da1acace1
parent 12429 eabcc3ae22e9
child 12472 353836684009
--- a/net/connect.lua	Mon Mar 21 11:01:58 2022 +0000
+++ b/net/connect.lua	Mon Mar 21 11:15:30 2022 +0000
@@ -93,9 +93,13 @@
 	p.conns[conn] = nil;
 	p.last_error = reason or "unknown reason";
 	p:log("debug", "Connection attempt failed: %s", p.last_error);
-	if next(p.conns) == nil and not p.connected then
+	if p.connected then
+		p:log("debug", "Connection already established, ignoring failure");
+	elseif next(p.conns) == nil then
 		p:log("debug", "No pending connection attempts, and not yet connected");
 		attempt_connection(p);
+	else
+		p:log("debug", "Other attempts are still pending, ignoring failure");
 	end
 end