diff options
author | Kim Alvefur <zash@zash.se> | 2018-11-24 02:25:44 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-11-24 02:25:44 +0100 |
commit | 8e68b0dd1adfcd7932f368a0b00dd2019c95db38 (patch) | |
tree | 68ec4fdd07393bba14e956c23cdbbd03574bf93d /plugins | |
parent | ee0fd8f1d90b736597baff3d7e1fd7dd1d28240b (diff) | |
download | prosody-8e68b0dd1adfcd7932f368a0b00dd2019c95db38.tar.gz prosody-8e68b0dd1adfcd7932f368a0b00dd2019c95db38.zip |
mod_csi_simple: Use write locks in net.server if available
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_csi_simple.lua | 6 |
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); |