diff options
author | Kim Alvefur <zash@zash.se> | 2018-09-26 14:25:59 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-09-26 14:25:59 +0200 |
commit | 074af5e0b12bad4c2bae660f32003b0b0ed129bf (patch) | |
tree | aaf5dc7cdf93938b5caf6c2ef7451caf7cf0ae13 /net/server_event.lua | |
parent | 87a85e347ea0c997cc9c0fb81901158812b17be8 (diff) | |
download | prosody-074af5e0b12bad4c2bae660f32003b0b0ed129bf.tar.gz prosody-074af5e0b12bad4c2bae660f32003b0b0ed129bf.zip |
net.server: Call a 'onattach' callback when replacing listeners
Diffstat (limited to 'net/server_event.lua')
-rw-r--r-- | net/server_event.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/server_event.lua b/net/server_event.lua index 6daf0944..8ee2f28d 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -424,7 +424,9 @@ function interface_mt:setlistener(listener) self.onreadtimeout = listener.onreadtimeout; self.onstatus = listener.onstatus; self.ondetach = listener.ondetach; + self.onattach = listener.onattach; self.ondrain = listener.ondrain; + self:onattach(); end -- Stub handlers @@ -446,6 +448,8 @@ function interface_mt:ondrain() end function interface_mt:ondetach() end +function interface_mt:onattach() +end function interface_mt:onstatus() end |