diff options
-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; |