From 7297ec818dae9c86b1f614743129553242cf23b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Thu, 10 Nov 2022 21:31:40 +0100 Subject: Storage: reload head on watch start --- include/erebos/storage.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/erebos/storage.h b/include/erebos/storage.h index 735b399..62619a2 100644 --- a/include/erebos/storage.h +++ b/include/erebos/storage.h @@ -657,7 +657,8 @@ WatchedHead Head::watch(const std::function &)> & watch template Bhv Head::behavior() const { - return make_shared>(*this); + auto cur = ref().storage().template head(id()); + return make_shared>(cur ? *cur : *this); } template -- cgit v1.2.3