diff --git a/lib/proxy.js b/lib/proxy.js index 7aaf018..392e790 100644 --- a/lib/proxy.js +++ b/lib/proxy.js @@ -414,8 +414,8 @@ module.exports.createProxyServer = function (opts) { if (e.code == 'EADDRINUSE') { console.log('Address in use, retrying...'); setTimeout(function () { - server.close(); - server.listen(opts['transSslPort'], hostname); + transSslServer.close(); + transSslServer.listen(opts['transSslPort'], hostname); }, 1000); } else { emitter.emit('error', e, 'transSslError');