aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_csi_simple.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_csi_simple.lua')
-rw-r--r--plugins/mod_csi_simple.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua
index da2dd953..abe65fce 100644
--- a/plugins/mod_csi_simple.lua
+++ b/plugins/mod_csi_simple.lua
@@ -86,7 +86,9 @@ end, -1);
module:hook("csi-client-inactive", function (event)
local session = event.origin;
- if session.pump then
+ if session.conn and session.conn and session.conn.pause_writes then
+ session.conn:pause_writes();
+ elseif session.pump then
session.pump:pause();
else
local bare_jid = jid.join(session.username, session.host);
@@ -115,6 +117,8 @@ module:hook("csi-client-active", function (event)
local session = event.origin;
if session.pump then
session.pump:resume();
+ elseif session.conn and session.conn and session.conn.resume_writes then
+ session.conn:resume_writes();
end
end);