Skip to content

Commit 2b0cf13

Browse files
committed
Bugfix: DummyKVBlobStore was not clearing the changed flag for networks and fabrics
1 parent ec0bff5 commit 2b0cf13

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/persist.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,14 @@ impl KvBlobStore for DummyKvBlobStore {
322322
Ok(())
323323
}
324324

325-
async fn store<F>(&mut self, _key: u16, _buf: &mut [u8], _cb: F) -> Result<(), Error>
325+
async fn store<F>(&mut self, _key: u16, buf: &mut [u8], cb: F) -> Result<(), Error>
326326
where
327327
F: FnOnce(&mut [u8]) -> Result<usize, Error>,
328328
{
329+
// Need to call the callback even if we are not storing for real, so as
330+
// the callback can mark its internal state as "stored".
331+
cb(buf)?;
332+
329333
Ok(())
330334
}
331335

0 commit comments

Comments
 (0)