Software /
code /
prosody
Changeset
9311:9b0604fe01f1
net.server_epoll: Make read_size a server-wide option
Can still be overriden per connection
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 13 Sep 2018 21:09:55 +0200 |
parents | 9310:2d2d4c293efa |
children | 9312:6cab07323274 |
files | net/server_epoll.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_epoll.lua Thu Sep 13 21:07:44 2018 +0200 +++ b/net/server_epoll.lua Thu Sep 13 21:09:55 2018 +0200 @@ -37,6 +37,7 @@ 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 @@ -- 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);