Software /
code /
prosody
Diff
net/server_event.lua @ 9385:58fe099043ed
net.server: Call a 'onattach' callback when replacing listeners
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 26 Sep 2018 14:25:59 +0200 |
parent | 8983:23f66f04e216 |
child | 9387:33e52f727f0f |
line wrap: on
line diff
--- a/net/server_event.lua Wed Sep 26 14:57:09 2018 +0200 +++ b/net/server_event.lua Wed Sep 26 14:25:59 2018 +0200 @@ -424,7 +424,9 @@ 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 @@ end function interface_mt:ondetach() end +function interface_mt:onattach() +end function interface_mt:onstatus() end