aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_event.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-26 17:36:53 +0200
committerKim Alvefur <zash@zash.se>2018-09-26 17:36:53 +0200
commit7a86af343f4755531e9c04adefa808c36462ae43 (patch)
tree81c62534a9d870f4462bbb306f51dea28c0509a3 /net/server_event.lua
parent7f9c753df9f016cc67bb2ee67a9a4f5652d0ec0b (diff)
downloadprosody-7a86af343f4755531e9c04adefa808c36462ae43.tar.gz
prosody-7a86af343f4755531e9c04adefa808c36462ae43.zip
net.connect: Fix passing request table to new listener
This could be a return value from ondetach
Diffstat (limited to 'net/server_event.lua')
-rw-r--r--net/server_event.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/server_event.lua b/net/server_event.lua
index 8ee2f28d..9fde558e 100644
--- a/net/server_event.lua
+++ b/net/server_event.lua
@@ -415,7 +415,7 @@ function interface_mt:setoption(option, value)
return false, "setoption not implemented";
end
-function interface_mt:setlistener(listener)
+function interface_mt:setlistener(listener, data)
self:ondetach(); -- Notify listener that it is no longer responsible for this connection
self.onconnect = listener.onconnect;
self.ondisconnect = listener.ondisconnect;
@@ -426,7 +426,7 @@ function interface_mt:setlistener(listener)
self.ondetach = listener.ondetach;
self.onattach = listener.onattach;
self.ondrain = listener.ondrain;
- self:onattach();
+ self:onattach(data);
end
-- Stub handlers