v2.4.3: only print default message if there are no 'listening' listeners
This commit is contained in:
parent
1dae4248c3
commit
b4d72bbd13
4
index.js
4
index.js
|
@ -119,7 +119,7 @@ module.exports.create = function (opts) {
|
||||||
// Report plain http status
|
// Report plain http status
|
||||||
if ('function' === typeof fnPlain) {
|
if ('function' === typeof fnPlain) {
|
||||||
fnPlain.apply(plainServer);
|
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())
|
console.info('[:' + (plainServer.address().port || plainServer.address())
|
||||||
+ "] Handling ACME challenges and redirecting to " + server.type);
|
+ "] Handling ACME challenges and redirecting to " + server.type);
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ module.exports.create = function (opts) {
|
||||||
// Report h2/https status
|
// Report h2/https status
|
||||||
if ('function' === typeof fn) {
|
if ('function' === typeof fn) {
|
||||||
fn.apply(server);
|
fn.apply(server);
|
||||||
} else if (server.listenerCount('listening') < 2) {
|
} else if (!server.listenerCount('listening')) {
|
||||||
console.info('[:' + (server.address().port || server.address()) + "] Serving " + server.type);
|
console.info('[:' + (server.address().port || server.address()) + "] Serving " + server.type);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "greenlock-express",
|
"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.",
|
"description": "Free SSL and managed or automatic HTTPS for node.js with Express, Koa, Connect, Hapi, and all other middleware systems.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"homepage": "https://git.coolaj86.com/coolaj86/greenlock-express.js",
|
"homepage": "https://git.coolaj86.com/coolaj86/greenlock-express.js",
|
||||||
|
|
Loading…
Reference in New Issue