Skip to content

Commit

Permalink
core: fix file close bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjunLi committed Apr 11, 2024
1 parent b85c483 commit ae50a33
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions triedb/pathdb/journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func (fw *JournalFileWriter) Write(b []byte) (int, error) {
}

func (fw *JournalFileWriter) Close() {
fw.file.Close()
}

func (fw *JournalFileWriter) Size() uint64 {
Expand Down Expand Up @@ -139,6 +140,7 @@ func (fr *JournalFileReader) Read(p []byte) (n int, err error) {
}

func (fr *JournalFileReader) Close() {
fr.file.Close()
}

func (kr *JournalKVReader) Read(p []byte) (n int, err error) {
Expand Down

0 comments on commit ae50a33

Please sign in to comment.