From 966f062f889718a4d6a4b95a64f1c0d5d4b0f170 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 28 Dec 2012 14:26:21 +0100 Subject: net.server_event: Destroy interfaces immediately, fixes reopening of servers. --- net/server_event.lua | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/net/server_event.lua b/net/server_event.lua index 5316866e..e69530ff 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -120,14 +120,8 @@ do self.position = new_position or self.position return self.position; end - function interface_mt:_close() -- regs event to start self:_destroy() - local callback = function( ) - self:_destroy(); - self.eventclose = nil - return -1 - end - self.eventclose = addevent( base, nil, EV_TIMEOUT, callback, 0 ) - return true + function interface_mt:_close() + return self:_destroy(); end function interface_mt:_start_connection(plainssl) -- should be called from addclient -- cgit v1.2.3