Changeset

867:21347a87e185

net.server: Check for potential nil handler on close
author Matthew Wild <mwild1@gmail.com>
date Tue, 03 Mar 2009 20:12:31 +0000
parents 866:8958fe4b2391
children 868:9e058e51ecaf
files net/server.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/net/server.lua	Tue Mar 03 19:49:40 2009 +0000
+++ b/net/server.lua	Tue Mar 03 20:12:31 2009 +0000
@@ -318,6 +318,7 @@
         return shutdown( socket, pattern )
     end
     handler.close = function( forced )
+        if not handler then return true; end
         _readlistlen = removesocket( _readlist, socket, _readlistlen )
         _readtimes[ handler ] = nil
         if bufferqueuelen ~= 0 then