aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2015-01-19 14:05:37 -0500
committerdaurnimator <quae@daurnimator.com>2015-01-19 14:05:37 -0500
commit8843844d0a481c43a63268f7f942a88037e4c422 (patch)
tree0fd6ac83585fdd5e4a24f78b81c13770aeb3eb36
parentea84b7e27817d24e462bac02d64959a9c3483a9d (diff)
downloadprosody-8843844d0a481c43a63268f7f942a88037e4c422.tar.gz
prosody-8843844d0a481c43a63268f7f942a88037e4c422.zip
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.
-rw-r--r--net/server_select.lua8
1 files changed, 0 insertions, 8 deletions
diff --git a/net/server_select.lua b/net/server_select.lua
index cf55be5d..a0574f33 100644
--- a/net/server_select.lua
+++ b/net/server_select.lua
@@ -57,7 +57,6 @@ local getaddrinfo = luasocket.dns.getaddrinfo
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 _sendtraffic
local _readtraffic
local _selecttimeout
-local _sleeptime
local _tcpbacklog
local _starttime
@@ -138,7 +136,6 @@ _sendtraffic = 0 -- some stats
_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 @@ end
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 @@ changesettings = function( new )
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 @@ loop = function(once) -- this is the main loop of the program
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"