Implement expire
When session becomes stale (not seeing any activity in a while),
blobs manager will call the expire method to clean it up.
With binarystore the cleanup is to close the session, which
by design will abort uncommitted data.
Resolves: openbmc/phosphor-ipmi-blobs-binarystore#2
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: Ibd16e28dcc7d29f9719b13926fe847be728df43b
diff --git a/handler.cpp b/handler.cpp
index fbfaf47..0556633 100644
--- a/handler.cpp
+++ b/handler.cpp
@@ -185,8 +185,7 @@
bool BinaryStoreBlobHandler::expire(uint16_t session)
{
- /* Binary store handler doesn't support expire */
- return false;
+ return close(session);
}
} // namespace blobs