# HG changeset patch # User Kim Alvefur # Date 1538322913 -7200 # Node ID 02155a10c5e90b21cff8acf6460e0c2d62b2d1a4 # Parent a48579a7b709e1aa4c81e3ef10e9f9ec9c66123d mod_websocket: Silence the one warning instead of ignoring the entire file diff -r a48579a7b709 -r 02155a10c5e9 .luacheckrc --- a/.luacheckrc Sun Sep 30 17:54:09 2018 +0200 +++ b/.luacheckrc Sun Sep 30 17:55:13 2018 +0200 @@ -140,7 +140,6 @@ "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 -r a48579a7b709 -r 02155a10c5e9 plugins/mod_websocket.lua --- a/plugins/mod_websocket.lua Sun Sep 30 17:54:09 2018 +0200 +++ b/plugins/mod_websocket.lua Sun Sep 30 17:55:13 2018 +0200 @@ -95,6 +95,8 @@ 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");