From 8fbfa43f8cc2f3ab13886be4f4c412b7b449c31d Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 10 Aug 2016 10:23:12 -0400 Subject: [PATCH] fix #19 (tested) --- lib/servers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/servers.js b/lib/servers.js index 5c351ee..1c2b7a1 100644 --- a/lib/servers.js +++ b/lib/servers.js @@ -59,12 +59,12 @@ module.exports.create = function (challenge) { var server = https.createServer(httpsOptions, servers.httpResponder); servers._servers.push(server); - servers.listen(port, function () { + server.listen(port, function () { if (opts.debug) { console.info('Listening https on', this.address()); } }); - servers.on('error', function (err) { + server.on('error', function (err) { if ('EADDRINUSE' === err.code) { console.error(""); console.error("You already have a different server running on port '" + port + "'.");