summaryrefslogtreecommitdiff
path: root/src/network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network.cpp')
-rw-r--r--src/network.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/network.cpp b/src/network.cpp
index 4e802f9..8d318f7 100644
--- a/src/network.cpp
+++ b/src/network.cpp
@@ -703,8 +703,10 @@ void Server::Peer::updateService(ReplyBuilder & reply)
for (auto & x : serviceQueue) {
if (auto ref = std::get<1>(x)->check(reply)) {
if (lpeer) {
+ Service::Context ctx { nullptr };
+
server.localHead.update([&] (const Stored<LocalState> & local) {
- Service::Context ctx(new Service::Context::Priv {
+ ctx = Service::Context(new Service::Context::Priv {
.ref = *ref,
.peer = erebos::Peer(lpeer),
.local = local,
@@ -719,6 +721,8 @@ void Server::Peer::updateService(ReplyBuilder & reply)
return ctx.local();
});
+
+ ctx.runAfterCommitHooks();
}
} else {
next.push_back(std::move(x));