Software /
code /
prosody
Diff
plugins/mod_s2s.lua @ 11623:cce5191a65a7
mod_s2s: Guard against LuaSec not returning TLS info here too
See previous commit to mod_c2s: a62146353528
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 21 Jun 2021 13:43:40 +0200 |
parent | 11609:6dcc45a2e3bc |
child | 11624:1b7669c49459 |
line wrap: on
line diff
--- a/plugins/mod_s2s.lua Mon Jun 21 13:36:05 2021 +0200 +++ b/plugins/mod_s2s.lua Mon Jun 21 13:43:40 2021 +0200 @@ -385,7 +385,8 @@ session.encrypted = true; local sock = session.conn:socket(); - if sock.info then + local info = sock.info and sock:info(); + if type(info) == "table" then local info = sock:info(); (session.log or log)("info", "Stream encrypted (%s with %s)", info.protocol, info.cipher); session.compressed = info.compression;