Changeset

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
parents 7912:2c204ba8e52e
children 7914:a6eb3b6bf903
files plugins/mod_tls.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
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;