Diff

net/server.lua @ 868:9e058e51ecaf

net.server: Don't call shutdown method on socket if it doesn't have one, eg. for UDP
author Matthew Wild <mwild1@gmail.com>
date Wed, 04 Mar 2009 12:44:07 +0000
parent 867:21347a87e185
child 885:38ed2db19a55
line wrap: on
line diff
--- a/net/server.lua	Tue Mar 03 20:12:31 2009 +0000
+++ b/net/server.lua	Wed Mar 04 12:44:07 2009 +0000
@@ -333,7 +333,7 @@
                 send( socket, table_concat( bufferqueue, "", 1, bufferqueuelen ), 1, bufferlen )    -- forced send
             end
         end
-        shutdown( socket )
+        _ = shutdown and shutdown( socket )
         socket:close( )
         _sendlistlen = removesocket( _sendlist, socket, _sendlistlen )
         _socketlist[ socket ] = nil