From 177fab23222475c957708a7751086b5fff17c67c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 26 Sep 2018 17:36:53 +0200 Subject: net.connect: Fix passing request table to new listener This could be a return value from ondetach --- net/server_event.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/server_event.lua') 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 -- cgit v1.2.3