aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-06-21 13:43:40 +0200
committerKim Alvefur <zash@zash.se>2021-06-21 13:43:40 +0200
commitd07638c8d28ecfbb04bc63058901e2aa86652ab5 (patch)
treef3624fa2e6f5b2d588f05e1d9c3150a7be8ec9fb /plugins/mod_s2s.lua
parent814a3a3482fb49f620f24f02b88be55136f8733b (diff)
downloadprosody-d07638c8d28ecfbb04bc63058901e2aa86652ab5.tar.gz
prosody-d07638c8d28ecfbb04bc63058901e2aa86652ab5.zip
mod_s2s: Guard against LuaSec not returning TLS info here too
See previous commit to mod_c2s: a62146353528
Diffstat (limited to 'plugins/mod_s2s.lua')
-rw-r--r--plugins/mod_s2s.lua3
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;