Skip to content

Commit

Permalink
Clear cache before watch callbacks when pruning
Browse files Browse the repository at this point in the history
Doing the cache clear / watch callbacks in one go was causing issues
for NAT, and didn't make sense.

Signed-off-by: carlgsmith <[email protected]>
  • Loading branch information
blairsteven authored and carlgsmith committed Jan 5, 2015
1 parent 273dd22 commit 188e178
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apteryxd.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,13 +814,17 @@ apteryx__prune (Apteryx__Server_Service *service,
closure (&result, closure_data);

/* Call watchers for each pruned path */
#ifdef USE_SHM_CACHE
for (iter = paths; iter; iter = g_list_next (iter))
{
#ifdef USE_SHM_CACHE
cache_set ((const char *) iter->data, NULL, 0);
}
#endif
for (iter = paths; iter; iter = g_list_next (iter))
{
notify_watchers ((const char *) iter->data);
}

g_list_free_full (paths, free);
return;
}
Expand Down

0 comments on commit 188e178

Please sign in to comment.