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() +}