aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-13 21:09:55 +0200
committerKim Alvefur <zash@zash.se>2018-09-13 21:09:55 +0200
commit213be6f9a19beb76264a8a9eceee7ff468b9013b (patch)
tree9b99e73f4b8c28f5bbb45152c82ccf9f5cab753d /net
parent63125adc9029b994d6fc9bbdf66ccee23fcdf751 (diff)
downloadprosody-213be6f9a19beb76264a8a9eceee7ff468b9013b.tar.gz
prosody-213be6f9a19beb76264a8a9eceee7ff468b9013b.zip
net.server_epoll: Make read_size a server-wide option
Can still be overriden per connection
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 24cbd653..d556bf37 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -37,6 +37,7 @@ local default_config = { __index = {
tcp_backlog = 128;
accept_retry_interval = 10;
read_retry_delay = 1e-06;
+ read_size = 8192;
connect_timeout = 20;
handshake_timeout = 60;
max_wait = 86400;
@@ -306,7 +307,7 @@ end
-- Called when socket is readable
function interface:onreadable()
- local data, err, partial = self.conn:receive(self.read_size);
+ local data, err, partial = self.conn:receive(self.read_size or cfg.read_size);
if data then
self:onconnect();
self:on("incoming", data);