fix(certificate-manager, smart-proxy): Fix race condition in ACME certificate provisioning and refactor certificate manager initialization to defer provisioning until after port listeners are active
This commit is contained in:
@ -350,6 +350,12 @@ export class SmartProxy extends plugins.EventEmitter {
|
||||
|
||||
// Start port listeners using the PortManager
|
||||
await this.portManager.addPorts(listeningPorts);
|
||||
|
||||
// Now that ports are listening, provision any required certificates
|
||||
if (this.certManager) {
|
||||
console.log('Starting certificate provisioning now that ports are ready');
|
||||
await this.certManager.provisionAllCertificates();
|
||||
}
|
||||
|
||||
// Set up periodic connection logging and inactivity checks
|
||||
this.connectionLogger = setInterval(() => {
|
||||
|
Reference in New Issue
Block a user