aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-30 17:55:13 +0200
committerKim Alvefur <zash@zash.se>2018-09-30 17:55:13 +0200
commit0cf46e37a751d64c9d76419f4fa41f911a3359c6 (patch)
tree91b1cace7dd8201de77daf92f68c196dd14f4e86
parent8eadeee911dab4d4133e2bf38174959ff552f721 (diff)
downloadprosody-0cf46e37a751d64c9d76419f4fa41f911a3359c6.tar.gz
prosody-0cf46e37a751d64c9d76419f4fa41f911a3359c6.zip
mod_websocket: Silence the one warning instead of ignoring the entire file
-rw-r--r--.luacheckrc1
-rw-r--r--plugins/mod_websocket.lua2
2 files changed, 2 insertions, 1 deletions
diff --git a/.luacheckrc b/.luacheckrc
index 80436d90..fe9ff3a2 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -140,7 +140,6 @@ if os.getenv("PROSODY_STRICT_LINT") ~= "1" then
"plugins/mod_privacy.lua";
"plugins/mod_storage_sql1.lua";
"plugins/mod_storage_sql.lua";
- "plugins/mod_websocket.lua";
"spec/core_configmanager_spec.lua";
"spec/core_moduleapi_spec.lua";
diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua
index f981e871..a668b4fa 100644
--- a/plugins/mod_websocket.lua
+++ b/plugins/mod_websocket.lua
@@ -95,6 +95,8 @@ local function session_close(session, reason)
session.send(st.stanza("close", { xmlns = xmlns_framing }));
function session.send() return false; end
+ -- luacheck: ignore 422/reason
+ -- FIXME reason should be handled in common place
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");