net.server: Don't call shutdown method on socket if it doesn't have one, eg. for UDP

This commit is contained in:
Matthew Wild 2009-03-04 12:44:07 +00:00
parent 898101d2d8
commit 6a5be71308

View file

@ -333,7 +333,7 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
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