aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_select.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-26 14:25:59 +0200
committerKim Alvefur <zash@zash.se>2018-09-26 14:25:59 +0200
commit074af5e0b12bad4c2bae660f32003b0b0ed129bf (patch)
treeaaf5dc7cdf93938b5caf6c2ef7451caf7cf0ae13 /net/server_select.lua
parent87a85e347ea0c997cc9c0fb81901158812b17be8 (diff)
downloadprosody-074af5e0b12bad4c2bae660f32003b0b0ed129bf.tar.gz
prosody-074af5e0b12bad4c2bae660f32003b0b0ed129bf.zip
net.server: Call a 'onattach' callback when replacing listeners
Diffstat (limited to 'net/server_select.lua')
-rw-r--r--net/server_select.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/server_select.lua b/net/server_select.lua
index 2cd095fe..1b535bb7 100644
--- a/net/server_select.lua
+++ b/net/server_select.lua
@@ -331,6 +331,9 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
drain = listeners.ondrain
handler.onreadtimeout = listeners.onreadtimeout
detach = listeners.ondetach
+ if listeners.onattach then
+ listeners.onattach(self)
+ end
end
handler.getstats = function( )
return readtraffic, sendtraffic