# HG changeset patch # User daurnimator # Date 1421694337 18000 # Node ID 32c84e1f706d40ff8bb49020a8b66c0c47f4db52 # Parent a702786f4f311d02e6a192bf019e365036cc2482 net.server_select: Remove socket.sleep call from main loop It's been there since the start; but should really not be required. People can remember an issue with FreeBSD that this solved, but this was a hack solution anyway. If that issue rears it's head again, we will solve it properly. diff -r a702786f4f31 -r 32c84e1f706d net/server_select.lua --- a/net/server_select.lua Mon Jan 19 14:01:11 2015 -0500 +++ b/net/server_select.lua Mon Jan 19 14:05:37 2015 -0500 @@ -57,7 +57,6 @@ local ssl_wrap = ( has_luasec and luasec.wrap ) local socket_bind = luasocket.bind -local socket_sleep = luasocket.sleep local socket_select = luasocket.select --// functions //-- @@ -101,7 +100,6 @@ local _readtraffic local _selecttimeout -local _sleeptime local _tcpbacklog local _starttime @@ -138,7 +136,6 @@ _readtraffic = 0 _selecttimeout = 1 -- timeout of socket.select -_sleeptime = 0 -- time to wait at the end of every loop _tcpbacklog = 128 -- some kind of hint to the OS _maxsendlen = 51000 * 1024 -- max len of send buffer @@ -790,7 +787,6 @@ getsettings = function( ) return { select_timeout = _selecttimeout; - select_sleep_time = _sleeptime; tcp_backlog = _tcpbacklog; max_send_buffer_size = _maxsendlen; max_receive_buffer_size = _maxreadlen; @@ -808,7 +804,6 @@ return nil, "invalid settings table" end _selecttimeout = tonumber( new.select_timeout ) or _selecttimeout - _sleeptime = tonumber( new.select_sleep_time ) or _sleeptime _maxsendlen = tonumber( new.max_send_buffer_size ) or _maxsendlen _maxreadlen = tonumber( new.max_receive_buffer_size ) or _maxreadlen _checkinterval = tonumber( new.select_idle_check_interval ) or _checkinterval @@ -941,9 +936,6 @@ end end end - - -- wait some time (0 by default) - socket_sleep( _sleeptime ) until quitting; if once and quitting == "once" then quitting = nil; return; end return "quitting"