diff options
author | Kim Alvefur <zash@zash.se> | 2018-09-13 21:09:55 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-09-13 21:09:55 +0200 |
commit | 03097e523057993058982974b0dfe9719281b924 (patch) | |
tree | 9b99e73f4b8c28f5bbb45152c82ccf9f5cab753d /net | |
parent | aaed8b90a0817b79a1d958f4dbaa3d6515907682 (diff) | |
download | prosody-03097e523057993058982974b0dfe9719281b924.tar.gz prosody-03097e523057993058982974b0dfe9719281b924.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.lua | 3 |
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); |