comparison net/server_epoll.lua @ 13809:2cfb6625b6d2 13.0

net.server_epoll: Use correct connection timeout when initiating Direct TLS Otherwise it takes a lot longer to time out Direct TLS connections than TCP / STARTTLS connections.
author Kim Alvefur <zash@zash.se>
date Wed, 02 Apr 2025 15:54:31 +0200
parents 0bd65ed1fd10
children 334fb7adb0bc
comparison
equal deleted inserted replaced
13807:21c58b1d5b47 13809:2cfb6625b6d2
770 end 770 end
771 self.onwritable = interface.inittls; 771 self.onwritable = interface.inittls;
772 self.onreadable = interface.inittls; 772 self.onreadable = interface.inittls;
773 self:set(true, true); 773 self:set(true, true);
774 self:setreadtimeout(false); 774 self:setreadtimeout(false);
775 self:setwritetimeout(cfg.ssl_handshake_timeout); 775 self:setwritetimeout(self._connected and cfg.ssl_handshake_timeout or cfg.connect_timeout);
776 self:debug("Prepared to start TLS"); 776 self:debug("Prepared to start TLS");
777 end 777 end
778 end 778 end
779 779
780 function interface:inittls(tls_ctx, now) 780 function interface:inittls(tls_ctx, now)