Diff

net/server.lua @ 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
parent 855:57057f2cbecb
child 868:9e058e51ecaf
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