From f684ae8a7c8034942f6373729c4ed39aff600dbe Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 6 Oct 2019 19:34:03 +0200 Subject: net.server_epoll: Guard against nil return from TLS info method --- net/server_epoll.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/server_epoll.lua') diff --git a/net/server_epoll.lua b/net/server_epoll.lua index 6c65bcdd..cccc8b5d 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -548,8 +548,8 @@ function interface:tlshandskake() 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"); -- cgit v1.2.3