We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c869bb commit 690fc56Copy full SHA for 690fc56
lib/proxy.js
@@ -98,9 +98,13 @@ Proxy.prototype._createHttpsServer = function (options, callback) {
98
httpsServer.on('request', this._onHttpServerRequest.bind(this, true));
99
var wssServer = new WebSocket.Server({ server: httpsServer });
100
wssServer.on('connection', this._onWebSocketServerConnect.bind(this, true));
101
- httpsServer.listen(this.httpsPort || undefined, function() {
+ var listenArgs = [function() {
102
if (callback) callback(httpsServer.address().port, httpsServer, wssServer);
103
- });
+ }];
104
+ if (this.httpsPort) {
105
+ listenArgs.unshift(this.httpsPort);
106
+ }
107
+ httpsServer.listen.apply(httpsServer, listenArgs);
108
};
109
110
Proxy.prototype.close = function () {
0 commit comments