aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-02-26 15:20:35 +0000
committerMatthew Wild <mwild1@gmail.com>2018-02-26 15:20:35 +0000
commitc394f11359d7670f675f1ab525ae1fc2aec0570a (patch)
tree93fd45f08e59c797caf17f09e9543dc8e0a2affa /net
parentd67abe23f84f30b3fef833b20751f3e63f8819ef (diff)
downloadprosody-c394f11359d7670f675f1ab525ae1fc2aec0570a.tar.gz
prosody-c394f11359d7670f675f1ab525ae1fc2aec0570a.zip
net.connect: Track last connection error
Diffstat (limited to 'net')
-rw-r--r--net/connect.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/connect.lua b/net/connect.lua
index 675116e2..aa6e622b 100644
--- a/net/connect.lua
+++ b/net/connect.lua
@@ -56,7 +56,8 @@ function pending_connection_listeners.ondisconnect(conn, reason)
log("warn", "Failed connection, but unexpected!");
return;
end
- p:log("debug", "Connection attempt failed");
+ p.last_error = reason or "unknown reason";
+ p:log("debug", "Connection attempt failed: %s", p.last_error);
attempt_connection(p);
end