Software /
code /
prosody
Diff
net/connect.lua @ 8546:d66916dc318a
net.connect: Track last connection error
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 26 Feb 2018 15:20:35 +0000 |
parent | 8536:c3f234e4ac23 |
child | 8547:5e9c87376891 |
line wrap: on
line diff
--- a/net/connect.lua Sun Feb 25 11:20:56 2018 +0100 +++ b/net/connect.lua Mon Feb 26 15:20:35 2018 +0000 @@ -56,7 +56,8 @@ 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