ix: prevent corestore corruption during graceful shutdown
- Reorder shutdown sequence to close pairing operations before DNSPass - Add proper tracking and cleanup of active Autopass.pair() operations - Handle shared corestore conflicts between pairing ops and main DNSPass - Ignore expected "store already closed" errors from pairing operations - Consolidate all Autopass resource cleanup in PHASE 2.5 This fixes the "Corestore is closed" uncaught exceptions and corruption that occurred when both pairing operations and DNSPass tried to close the same shared corestore during shutdown.
This commit is contained in:
@@ -77,7 +77,13 @@ async function getAllEntries(pass = state.dnsPass, useCache = true) {
|
||||
logDebug('Core', 'dnsPass is closed, returning cached entries');
|
||||
return entriesCache || [];
|
||||
}
|
||||
|
||||
|
||||
// Check if pass is ready - if not, wait briefly or return cached entries
|
||||
if (!pass.ready) {
|
||||
logDebug('Core', 'dnsPass is not ready yet, returning cached entries');
|
||||
return entriesCache || [];
|
||||
}
|
||||
|
||||
const entries = [];
|
||||
try {
|
||||
const stream = pass.list();
|
||||
|
||||
Reference in New Issue
Block a user