Diff

plugins/mod_tls.lua @ 7913:64daa21450f9

mod_tls: Suppress debug message if already using encryption
author Kim Alvefur <zash@zash.se>
date Sat, 25 Feb 2017 01:16:31 +0100
parent 7898:d8029b2e0f43
child 7959:3941d609ff85
line wrap: on
line diff
--- a/plugins/mod_tls.lua	Wed Feb 22 22:56:28 2017 +0100
+++ b/plugins/mod_tls.lua	Sat Feb 25 01:16:31 2017 +0100
@@ -63,7 +63,9 @@
 
 local function can_do_tls(session)
 	if not session.conn.starttls then
-		session.log("debug", "Underlying connection does not support STARTTLS");
+		if not session.secure then
+			session.log("debug", "Underlying connection does not support STARTTLS");
+		end
 		return false;
 	elseif session.ssl_ctx ~= nil then
 		return session.ssl_ctx;