Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/session/session-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export class SessionManager {
}

let oldestSessionId: string | null = null;
let oldestActivity = Date.now();
let oldestActivity = Number.MAX_SAFE_INTEGER; // Initialize to maximum value to find minimum

for (const [sessionId, metadata] of this.sessions) {
if (metadata.lastActivity < oldestActivity) {
Expand Down
12 changes: 5 additions & 7 deletions src/core/vector_storage/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,11 @@ export class VectorStoreManager {

// Disconnect any successfully connected backend
if (this.store?.isConnected()) {
await this.store
.disconnect()
.catch(err =>
this.logger.error(`${LOG_PREFIXES.MANAGER} Error during cleanup disconnect`, {
error: err,
})
);
await this.store.disconnect().catch(err =>
this.logger.error(`${LOG_PREFIXES.MANAGER} Error during cleanup disconnect`, {
error: err,
})
);
}

// Reset state
Expand Down