Skip to content

Commit cffa7c0

Browse files
committed
tweak ssl
1 parent 32b0154 commit cffa7c0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

server.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ class Server extends EventEmitter {
6161

6262
// start an http tracker unless the user explictly says no
6363
if (opts.http !== false) {
64-
this.http = http.createServer(isObject(opts.http) ? opts.http : undefined)
64+
this.http = (opts.ssl ? https : http).createServer(
65+
{ ...isObject(opts.http) ? opts.http : {}, ...opts.ssl || {} }
66+
)
6567
this.http.on('error', err => { this._onError(err) })
6668
this.http.on('listening', onListening)
6769

@@ -141,7 +143,8 @@ class Server extends EventEmitter {
141143

142144
if (opts.stats !== false) {
143145
if (!this.http) {
144-
this.http = (opts.ssl ? https : http).createServer(opts.ssl)
146+
console.log(opts);
147+
this.http = http.createServer()
145148
this.http.on('error', err => { this._onError(err) })
146149
this.http.on('listening', onListening)
147150
}

0 commit comments

Comments
 (0)