Diff

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
line wrap: on
line diff
--- a/net/server_epoll.lua	Sat Oct 27 17:36:51 2018 +0200
+++ b/net/server_epoll.lua	Sat Oct 27 20:44:53 2018 +0200
@@ -475,8 +475,8 @@
 		self:del();
 		local ok, conn, err = pcall(luasec.wrap, self.conn, self.tls_ctx);
 		if not ok then
-			log("error", "Failed to initialize TLS: %s", conn);
 			conn, err = ok, conn;
+			log("error", "Failed to initialize TLS: %s", err);
 		end
 		if not conn then
 			self:on("disconnect", err);