diff options
author | Kim Alvefur <zash@zash.se> | 2021-06-21 13:43:40 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-06-21 13:43:40 +0200 |
commit | d07638c8d28ecfbb04bc63058901e2aa86652ab5 (patch) | |
tree | f3624fa2e6f5b2d588f05e1d9c3150a7be8ec9fb | |
parent | 814a3a3482fb49f620f24f02b88be55136f8733b (diff) | |
download | prosody-d07638c8d28ecfbb04bc63058901e2aa86652ab5.tar.gz prosody-d07638c8d28ecfbb04bc63058901e2aa86652ab5.zip |
mod_s2s: Guard against LuaSec not returning TLS info here too
See previous commit to mod_c2s: a62146353528
-rw-r--r-- | plugins/mod_s2s.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua index 86bb0795..08b9eedb 100644 --- a/plugins/mod_s2s.lua +++ b/plugins/mod_s2s.lua @@ -385,7 +385,8 @@ function stream_callbacks._streamopened(session, attr) 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; |