Software /
code /
prosody
Comparison
net/server_epoll.lua @ 9573:57637247356d
net.server_epoll: Shuffle variables earlier to improve readability
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 27 Oct 2018 20:44:53 +0200 |
parent | 9508:2055b497b515 |
child | 9581:1be99aedb0b3 |
child | 9663:1e63903d8a1e |
comparison
equal
deleted
inserted
replaced
9572:867e40b82409 | 9573:57637247356d |
---|---|
473 self._tls = true; | 473 self._tls = true; |
474 log("debug", "Start TLS on %s now", self); | 474 log("debug", "Start TLS on %s now", self); |
475 self:del(); | 475 self:del(); |
476 local ok, conn, err = pcall(luasec.wrap, self.conn, self.tls_ctx); | 476 local ok, conn, err = pcall(luasec.wrap, self.conn, self.tls_ctx); |
477 if not ok then | 477 if not ok then |
478 log("error", "Failed to initialize TLS: %s", conn); | |
479 conn, err = ok, conn; | 478 conn, err = ok, conn; |
479 log("error", "Failed to initialize TLS: %s", err); | |
480 end | 480 end |
481 if not conn then | 481 if not conn then |
482 self:on("disconnect", err); | 482 self:on("disconnect", err); |
483 self:destroy(); | 483 self:destroy(); |
484 return conn, err; | 484 return conn, err; |