Diff

net/server_select.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_select.lua	Wed Sep 26 15:07:25 2018 +0200
+++ b/net/server_select.lua	Wed Sep 26 17:36:53 2018 +0200
@@ -321,7 +321,7 @@
 	end
 	handler.onreadtimeout = onreadtimeout;
 
-	handler.setlistener = function( self, listeners )
+	handler.setlistener = function( self, listeners, data )
 		if detach then
 			detach(self) -- Notify listener that it is no longer responsible for this connection
 		end
@@ -332,7 +332,7 @@
 		handler.onreadtimeout = listeners.onreadtimeout
 		detach = listeners.ondetach
 		if listeners.onattach then
-			listeners.onattach(self)
+			listeners.onattach(self, data)
 		end
 	end
 	handler.getstats = function( )