Skip to content

Commit ca32dd7

Browse files
authored
fix(community): possible race condition on FileSystemChatMessageHistory (#9436)
1 parent e75b30b commit ca32dd7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.changeset/crisp-kiwis-end.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@langchain/community": patch
3+
---
4+
5+
Fix possible race condition in FileSystemChatMessageHistory

libs/langchain-community/src/stores/message/file_system.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ export class FileSystemChatMessageHistory extends BaseListChatMessageHistory {
113113

114114
protected async loadStore(): Promise<FileChatStore> {
115115
try {
116-
await fs.access(this.filePath, fs.constants.F_OK);
117116
const store = await fs.readFile(this.filePath, "utf-8");
118117
return JSON.parse(store) as FileChatStore;
119118
} catch (_error) {

0 commit comments

Comments
 (0)