Software /
code /
prosody
Comparison
net/server_select.lua @ 5633:d999027577ed
net.server_select: Default checkinterval to 30s, so that read timeouts are actually detected
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 24 May 2013 18:33:16 +0100 |
parent | 5632:8a2456f1f117 |
child | 5645:ae079d57af2e |
comparison
equal
deleted
inserted
replaced
5632:8a2456f1f117 | 5633:d999027577ed |
---|---|
143 _tcpbacklog = 128 -- some kind of hint to the OS | 143 _tcpbacklog = 128 -- some kind of hint to the OS |
144 | 144 |
145 _maxsendlen = 51000 * 1024 -- max len of send buffer | 145 _maxsendlen = 51000 * 1024 -- max len of send buffer |
146 _maxreadlen = 25000 * 1024 -- max len of read buffer | 146 _maxreadlen = 25000 * 1024 -- max len of read buffer |
147 | 147 |
148 _checkinterval = 1200000 -- interval in secs to check idle clients | 148 _checkinterval = 30 -- interval in secs to check idle clients |
149 _sendtimeout = 60000 -- allowed send idle time in secs | 149 _sendtimeout = 60000 -- allowed send idle time in secs |
150 _readtimeout = 6 * 60 * 60 -- allowed read idle time in secs | 150 _readtimeout = 6 * 60 * 60 -- allowed read idle time in secs |
151 | 151 |
152 local is_windows = package.config:sub(1,1) == "\\" -- check the directory separator, to detemine whether this is Windows | 152 local is_windows = package.config:sub(1,1) == "\\" -- check the directory separator, to detemine whether this is Windows |
153 _maxfd = luasocket._SETSIZE or (is_windows and math.huge) or 1024 -- max fd number, limit to 1024 by default to prevent glibc buffer overflow, but not on Windows | 153 _maxfd = luasocket._SETSIZE or (is_windows and math.huge) or 1024 -- max fd number, limit to 1024 by default to prevent glibc buffer overflow, but not on Windows |