Software /
code /
prosody
Changeset
9910:7a703af90c9c
mod_c2s: Fire an event when outgoing buffers have been emptied
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 24 Mar 2019 18:30:51 +0100 |
parents | 9909:3229be01a08a |
children | 9911:ed011935c22d |
files | plugins/mod_c2s.lua |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_c2s.lua Sat Nov 24 02:25:44 2018 +0100 +++ b/plugins/mod_c2s.lua Sun Mar 24 18:30:51 2019 +0100 @@ -332,6 +332,13 @@ 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