aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-07-18 09:17:31 +0200
committerKim Alvefur <zash@zash.se>2021-07-18 09:17:31 +0200
commitbce7688486e466afa35518ce506991046c4776d9 (patch)
tree65d7b93a753db09ea928ae1c5cccd80367b9c94d
parent64a444e3a2d5998c53650e71d22b00d20b1b5e97 (diff)
downloadprosody-bce7688486e466afa35518ce506991046c4776d9.tar.gz
prosody-bce7688486e466afa35518ce506991046c4776d9.zip
mod_s2s: Handle measurement where the local host is unknown
This could happen with Dialback-only connections or others that were missing the stream 'to' attribute.
-rw-r--r--plugins/mod_s2s.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua
index d4b0ca60..67adc0e0 100644
--- a/plugins/mod_s2s.lua
+++ b/plugins/mod_s2s.lua
@@ -645,7 +645,7 @@ local function session_close(session, reason, remote_reason, bounce_reason)
session.sends2s(stream_error);
end
else
- m_closed_connections:with_labels(this_host, session.direction, reason == false and ":remote-choice" or ":local-choice"):add(1)
+ m_closed_connections:with_labels(this_host or ":unknown", session.direction, reason == false and ":remote-choice" or ":local-choice"):add(1)
end
session.sends2s("</stream:stream>");