From bce7688486e466afa35518ce506991046c4776d9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 18 Jul 2021 09:17:31 +0200 Subject: 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. --- plugins/mod_s2s.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') 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(""); -- cgit v1.2.3