diff options
author | Kim Alvefur <zash@zash.se> | 2019-03-24 18:30:51 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-03-24 18:30:51 +0100 |
commit | 9e7035be7282a7902989904cec6aeec879814f49 (patch) | |
tree | 276b3ac38803ee60a6d08f1431c111d95f1b0ab1 /plugins | |
parent | 8e68b0dd1adfcd7932f368a0b00dd2019c95db38 (diff) | |
download | prosody-9e7035be7282a7902989904cec6aeec879814f49.tar.gz prosody-9e7035be7282a7902989904cec6aeec879814f49.zip |
mod_c2s: Fire an event when outgoing buffers have been emptied
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_c2s.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua index 8d7b92fe..7c6d95f7 100644 --- a/plugins/mod_c2s.lua +++ b/plugins/mod_c2s.lua @@ -332,6 +332,13 @@ function listener.onreadtimeout(conn) end end +function listener.ondrain(conn) + local session = sessions[conn]; + if session then + return (hosts[session.host] or prosody).events.fire_event("c2s-ondrain", { session = session }); + end +end + local function keepalive(event) local session = event.session; if not session.notopen then |