Software /
code /
prosody
Diff
net/server_epoll.lua @ 10309:2a31571efce0
net.server_epoll: Guard against nil return from TLS info method
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 06 Oct 2019 19:34:03 +0200 |
parent | 10307:6a997f0ceba8 |
child | 10328:5c2b31c823b9 |
line wrap: on
line diff
--- 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");