feat(lifecycle-component): enhance lifecycle management with unref support for timers and event listeners

fix(lifecycle-component): store actual event handler for proper cleanup
chore(meta): update certificate dates in meta.json
This commit is contained in:
2025-06-01 08:09:29 +00:00
parent cacc88797a
commit 726d40b9a5
4 changed files with 36 additions and 11 deletions

View File

@ -403,7 +403,12 @@ export class EnhancedConnectionPool<T> extends LifecycleComponent {
const startTime = Date.now();
while (this.activeConnections.size > 0 && Date.now() - startTime < timeout) {
await new Promise(resolve => setTimeout(resolve, 100));
await new Promise(resolve => {
const timer = setTimeout(resolve, 100);
if (typeof timer.unref === 'function') {
timer.unref();
}
});
}
// Destroy all connections