aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-10-06 19:34:03 +0200
committerKim Alvefur <zash@zash.se>2019-10-06 19:34:03 +0200
commit193bc49cac95c2876afcd223379a93eff9855770 (patch)
treef312333b2de48c92b6d532307d61ff8efcc36d6f /net
parente8eae31799c80382afb90ff4c0e888078bfd5494 (diff)
downloadprosody-193bc49cac95c2876afcd223379a93eff9855770.tar.gz
prosody-193bc49cac95c2876afcd223379a93eff9855770.zip
net.server_epoll: Guard against nil return from TLS info method
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua4
1 files changed, 2 insertions, 2 deletions
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");