Comparison

net/server_epoll.lua @ 11674:8253f6a30afc

net.server_epoll: Use TLS handshake timeout after initiating handshake The :init() method sets a different timeout than the TLS related methods.
author Kim Alvefur <zash@zash.se>
date Tue, 13 Jul 2021 14:27:46 +0200
parent 11673:3ab8496579f1
child 11675:139d80774f11
comparison
equal deleted inserted replaced
11673:3ab8496579f1 11674:8253f6a30afc
611 end 611 end
612 self:on("starttls"); 612 self:on("starttls");
613 self.ondrain = nil; 613 self.ondrain = nil;
614 self.onwritable = interface.tlshandshake; 614 self.onwritable = interface.tlshandshake;
615 self.onreadable = interface.tlshandshake; 615 self.onreadable = interface.tlshandshake;
616 return self:init(); 616 self:setreadtimeout(cfg.ssl_handshake_timeout);
617 self:setwritetimeout(cfg.ssl_handshake_timeout);
618 self:add(true, true);
617 end 619 end
618 620
619 function interface:tlshandshake() 621 function interface:tlshandshake()
620 self:setwritetimeout(false); 622 self:setwritetimeout(false);
621 self:setreadtimeout(false); 623 self:setreadtimeout(false);