Software /
code /
prosody
Diff
net/server_event.lua @ 9387:33e52f727f0f
net.connect: Fix passing request table to new listener
This could be a return value from ondetach
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 26 Sep 2018 17:36:53 +0200 |
parent | 9385:58fe099043ed |
child | 9473:5fdda751333a |
line wrap: on
line diff
--- a/net/server_event.lua Wed Sep 26 15:07:25 2018 +0200 +++ b/net/server_event.lua Wed Sep 26 17:36:53 2018 +0200 @@ -415,7 +415,7 @@ 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 @@ self.ondetach = listener.ondetach; self.onattach = listener.onattach; self.ondrain = listener.ondrain; - self:onattach(); + self:onattach(data); end -- Stub handlers