Changeset

3542:1bb2a90398d3

mod_limits: log throttled JID
author Georg Lukas <georg@op-co.de>
date Tue, 02 Apr 2019 16:27:14 +0200
parents 3541:4d8a68557941
children 3543:11629f04ddd0
files mod_limits/mod_limits.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_limits/mod_limits.lua	Tue Apr 02 16:19:11 2019 +0200
+++ b/mod_limits/mod_limits.lua	Tue Apr 02 16:27:14 2019 +0200
@@ -59,7 +59,7 @@
 	if throttle then
 		local ok, balance, outstanding = throttle:poll(#bytes, true);
 		if not ok then
-			session.log("debug", "Session over rate limit (%d) with %d (by %d), pausing", throttle.max, #bytes, outstanding);
+			session.log("debug", "Session %q over rate limit (%d) with %d (by %d), pausing", session.full_jid or session.from_host or session.to_host, throttle.max, #bytes, outstanding);
 			outstanding = ceil(outstanding);
 			session.conn:pause(); -- Read no more data from the connection until there is no outstanding data
 			local outstanding_data = bytes:sub(-outstanding);