From bbaa973f45bae97ac9d0427218c6b7bf855dc0fa Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Tue, 16 Jan 2024 19:04:57 -0500 Subject: [PATCH] Always close the Snaphot This may explain many test failures on Windows, for example https://ci.appveyor.com/project/otoolep/rqlite/builds/48967106. --- snapshot/snapshot.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/snapshot/snapshot.go b/snapshot/snapshot.go index 9d19b4f2..7912ad83 100644 --- a/snapshot/snapshot.go +++ b/snapshot/snapshot.go @@ -48,4 +48,7 @@ func (s *Snapshot) Persist(sink raft.SnapshotSink) error { } // Release releases the snapshot. -func (s *Snapshot) Release() {} +func (s *Snapshot) Release() { + // Necessary in case Persist() is never called. + s.rc.Close() +}