Software /
code /
prosody
Comparison
net/server_epoll.lua @ 9822:13c2707d2417 0.11
net.server_epoll: Rename handshake_timeout to ssl_handshake_timeout (fixes #1319)
This is to match server_event, see 430797a8fc81
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 09 Feb 2019 19:28:24 +0100 |
parent | 9821:7712488c8e49 |
child | 9823:b61ba4496923 |
child | 9931:485231f8b75d |
comparison
equal
deleted
inserted
replaced
9821:7712488c8e49 | 9822:13c2707d2417 |
---|---|
52 | 52 |
53 -- Size of chunks to read from sockets | 53 -- Size of chunks to read from sockets |
54 read_size = 8192; | 54 read_size = 8192; |
55 | 55 |
56 -- Timeout used during between steps in TLS handshakes | 56 -- Timeout used during between steps in TLS handshakes |
57 handshake_timeout = 60; | 57 ssl_handshake_timeout = 60; |
58 | 58 |
59 -- Maximum and minimum amount of time to sleep waiting for events (adjusted for pending timers) | 59 -- Maximum and minimum amount of time to sleep waiting for events (adjusted for pending timers) |
60 max_wait = 86400; | 60 max_wait = 86400; |
61 min_wait = 1e-06; | 61 min_wait = 1e-06; |
62 }}; | 62 }}; |
514 self:setwritetimeout(); | 514 self:setwritetimeout(); |
515 self:set(true, true); | 515 self:set(true, true); |
516 elseif err == "wantread" then | 516 elseif err == "wantread" then |
517 log("debug", "TLS handshake on %s to wait until readable", self); | 517 log("debug", "TLS handshake on %s to wait until readable", self); |
518 self:set(true, false); | 518 self:set(true, false); |
519 self:setreadtimeout(cfg.handshake_timeout); | 519 self:setreadtimeout(cfg.ssl_handshake_timeout); |
520 elseif err == "wantwrite" then | 520 elseif err == "wantwrite" then |
521 log("debug", "TLS handshake on %s to wait until writable", self); | 521 log("debug", "TLS handshake on %s to wait until writable", self); |
522 self:set(false, true); | 522 self:set(false, true); |
523 self:setwritetimeout(cfg.handshake_timeout); | 523 self:setwritetimeout(cfg.ssl_handshake_timeout); |
524 else | 524 else |
525 log("debug", "TLS handshake error on %s: %s", self, err); | 525 log("debug", "TLS handshake error on %s: %s", self, err); |
526 self:on("disconnect", err); | 526 self:on("disconnect", err); |
527 self:destroy(); | 527 self:destroy(); |
528 end | 528 end |