Only emit TLS disabled error on misconfig.

This commit is contained in:
Sergio Benitez 2017-04-13 01:30:48 -07:00
parent 6f29696b4f
commit e50164115b
1 changed files with 3 additions and 1 deletions

View File

@ -387,9 +387,11 @@ impl Rocket {
if tls_configured && cfg!(feature = "tls") { if tls_configured && cfg!(feature = "tls") {
info_!("tls: {}", White.paint("enabled")); info_!("tls: {}", White.paint("enabled"));
} else { } else {
error_!("tls: {}", White.paint("disabled"));
if tls_configured { if tls_configured {
error_!("tls: {}", White.paint("disabled"));
error_!("tls is configured, but the tls feature is disabled"); error_!("tls is configured, but the tls feature is disabled");
} else {
info_!("tls: {}", White.paint("disabled"));
} }
} }