Comparison

net/server_epoll.lua @ 9824:729de68f0068

net.server_epoll: Separate timeout for initial connection attempts server_event has this separation already
author Kim Alvefur <zash@zash.se>
date Sat, 09 Feb 2019 20:34:00 +0100
parent 9823:b61ba4496923
child 9825:5ccce16c6449
comparison
equal deleted inserted replaced
9823:b61ba4496923 9824:729de68f0068
39 read_timeout = 14 * 60; 39 read_timeout = 14 * 60;
40 40
41 -- How long to wait for a socket to become writable after queuing data to send 41 -- How long to wait for a socket to become writable after queuing data to send
42 send_timeout = 60; 42 send_timeout = 60;
43 43
44 -- How long to wait for a socket to become writable after creation
45 connect_timeout = 20;
46
44 -- Some number possibly influencing how many pending connections can be accepted 47 -- Some number possibly influencing how many pending connections can be accepted
45 tcp_backlog = 128; 48 tcp_backlog = 128;
46 49
47 -- If accepting a new incoming connection fails, wait this long before trying again 50 -- If accepting a new incoming connection fails, wait this long before trying again
48 accept_retry_interval = 10; 51 accept_retry_interval = 10;
583 end 586 end
584 end 587 end
585 588
586 -- Initialization 589 -- Initialization
587 function interface:init() 590 function interface:init()
588 self:setwritetimeout(); 591 self:setwritetimeout(cfg.connect_timeout);
589 return self:add(true, true); 592 return self:add(true, true);
590 end 593 end
591 594
592 function interface:pause() 595 function interface:pause()
593 return self:set(false); 596 return self:set(false);