From b4d72bbd13da425cafcad4ccd42d1d6833a206b4 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 18 Aug 2018 02:03:04 -0600 Subject: [PATCH] v2.4.3: only print default message if there are no 'listening' listeners --- index.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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",