aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-03-06 15:24:33 +0100
committerKim Alvefur <zash@zash.se>2017-03-06 15:24:33 +0100
commit71d437db39b20050a81c6f7d02abbf4e2cca4e31 (patch)
tree4494feb60803080aa23519ddbe4ec7093c04bbf7
parentd31b2b4f418cb1ef6f19c318f39ea82060108e4f (diff)
downloadprosody-71d437db39b20050a81c6f7d02abbf4e2cca4e31.tar.gz
prosody-71d437db39b20050a81c6f7d02abbf4e2cca4e31.zip
mod_c2s: Rename variable no avoid name clash [luacheck]
-rw-r--r--plugins/mod_c2s.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index 1374c108..a654213c 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -169,27 +169,27 @@ local function session_close(session, reason)
session.send("</stream:stream>");
function session.send() return false; end
- local reason = (reason and (reason.name or reason.text or reason.condition)) or reason;
- session.log("debug", "c2s stream for %s closed: %s", session.full_jid or ("<"..session.ip..">"), reason or "session closed");
+ local reason_text = (reason and (reason.name or reason.text or reason.condition)) or reason;
+ session.log("debug", "c2s stream for %s closed: %s", session.full_jid or ("<"..session.ip..">"), reason_text or "session closed");
-- Authenticated incoming stream may still be sending us stanzas, so wait for </stream:stream> from remote
local conn = session.conn;
- if reason == nil and not session.notopen and session.type == "c2s" then
+ if reason_text == nil and not session.notopen and session.type == "c2s" then
-- Grace time to process data from authenticated cleanly-closed stream
add_task(stream_close_timeout, function ()
if not session.destroyed then
session.log("warn", "Failed to receive a stream close response, closing connection anyway...");
- sm_destroy_session(session, reason);
+ sm_destroy_session(session, reason_text);
conn:close();
end
end);
else
- sm_destroy_session(session, reason);
+ sm_destroy_session(session, reason_text);
conn:close();
end
else
- local reason = (reason and (reason.name or reason.text or reason.condition)) or reason;
- sm_destroy_session(session, reason);
+ local reason_text = (reason and (reason.name or reason.text or reason.condition)) or reason;
+ sm_destroy_session(session, reason_text);
end
end