diff --git a/index.js b/index.js index df9a806..cfaa297 100644 --- a/index.js +++ b/index.js @@ -119,7 +119,7 @@ module.exports.create = function (opts) { // Report plain http status if ('function' === typeof fnPlain) { fnPlain.apply(plainServer); - } else if (!fn && plainServer.listenerCount('listening') < 2) { + } else if (!fn && !plainServer.listenerCount('listening') && !server.listenerCount('listening')) { console.info('[:' + (plainServer.address().port || plainServer.address()) + "] Handling ACME challenges and redirecting to " + server.type); } @@ -127,7 +127,7 @@ module.exports.create = function (opts) { // Report h2/https status if ('function' === typeof fn) { fn.apply(server); - } else if (server.listenerCount('listening') < 2) { + } else if (!server.listenerCount('listening')) { console.info('[:' + (server.address().port || server.address()) + "] Serving " + server.type); } }); diff --git a/package.json b/package.json index 6ecad7d..780d7d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "greenlock-express", - "version": "2.4.2", + "version": "2.4.3", "description": "Free SSL and managed or automatic HTTPS for node.js with Express, Koa, Connect, Hapi, and all other middleware systems.", "main": "index.js", "homepage": "https://git.coolaj86.com/coolaj86/greenlock-express.js",