more efficient checking

This commit is contained in:
AJ ONeal 2018-06-30 23:10:18 +00:00
parent 3773abdfdb
commit d60b458f47
1 changed files with 6 additions and 6 deletions

View File

@ -46,6 +46,12 @@ module.exports.createTcpConnectionHandler = function (state) {
function tryTls() {
var vhost;
if (!servername) {
if (state.debug) { console.log("No SNI was given, so there's nothing we can do here"); }
deferData('httpsInvalid');
return;
}
if (!state.servernames.length) {
console.info("[Setup] https => admin => setup => (needs bogus tls certs to start?)");
deferData('httpsSetupServer');
@ -62,12 +68,6 @@ module.exports.createTcpConnectionHandler = function (state) {
console.log("TODO: use www bare redirect");
}
if (!servername) {
if (state.debug) { console.log("No SNI was given, so there's nothing we can do here"); }
deferData('httpsInvalid');
return;
}
function run() {
var nextDevice = Devices.next(state.deviceLists, servername);
if (!nextDevice) {