# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1570383243 -7200
# Node ID 2a31571efce0c7aaab99dac16acc0116fb182f3b
# Parent  48e392dbf6e777881510425653d23e4f20e26d16
net.server_epoll: Guard against nil return from TLS info method

diff -r 48e392dbf6e7 -r 2a31571efce0 net/server_epoll.lua
--- a/net/server_epoll.lua	Sun Oct 06 16:34:42 2019 +0200
+++ b/net/server_epoll.lua	Sun Oct 06 19:34:03 2019 +0200
@@ -548,8 +548,8 @@
 	end
 	local ok, err = self.conn:dohandshake();
 	if ok then
-		if self.conn.info then
-			local info = self.conn:info();
+		local info = self.conn.info and self.conn:info();
+		if type(info) == "table" then
 			self:debug("TLS handshake complete (%s with %s)", info.protocol, info.cipher);
 		else
 			self:debug("TLS handshake complete");