From d07638c8d28ecfbb04bc63058901e2aa86652ab5 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 21 Jun 2021 13:43:40 +0200 Subject: mod_s2s: Guard against LuaSec not returning TLS info here too See previous commit to mod_c2s: a62146353528 --- plugins/mod_s2s.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3