Skip to content

Commit

Permalink
fix: https binding to wrong port at startup #2610
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Oct 18, 2023
1 parent 69b3936 commit ddd6211
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Service/Https.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ class ServiceHttps extends ServiceBase {
* @access protected
*/
listen() {
if (this.portConfig) {
this.port = Number(this.userconfig.getKey(this.portConfig))
}

if (this.server === undefined) {
if (this.userconfig.getKey('https_cert_type') == 'external') {
const priv = this.userconfig.getKey('https_ext_private_key')
Expand Down Expand Up @@ -136,6 +140,7 @@ class ServiceHttps extends ServiceBase {
* @param {Object} credentials - the certificate information
*/
startServer(credentials) {
console.log('start https', this.port, this.bindIP)
try {
this.server = _https.createServer(credentials, this.express)
this.server.on('error', this.handleSocketError.bind(this))
Expand Down

0 comments on commit ddd6211

Please sign in to comment.