Skip to content

Commit

Permalink
Merge 4e15eaf into be8a413
Browse files Browse the repository at this point in the history
  • Loading branch information
PengZheng authored Sep 24, 2023
2 parents be8a413 + 4e15eaf commit da65fcf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libs/framework/src/framework.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,14 @@ static void* framework_shutdown(void *framework) {
celixThreadMutex_unlock(&fw->installedBundles.mutex);

size = celix_arrayList_size(stopEntries);
for (int i = size-1; i >= 0; --i) { //note loop in reverse order -> stop later installed bundle first
celix_framework_bundle_entry_t *entry = celix_arrayList_get(stopEntries, i);

bundle_state_e state = celix_bundle_getState(entry->bnd);
if (state == CELIX_BUNDLE_STATE_ACTIVE || state == CELIX_BUNDLE_STATE_STARTING) {
celix_framework_stopBundleEntry(fw, entry);
}
}
for (int i = size-1; i >= 0; --i) { //note loop in reverse order -> uninstall later installed bundle first
celix_framework_bundle_entry_t *entry = celix_arrayList_get(stopEntries, i);
celix_framework_uninstallBundleEntry(fw, entry, false);
Expand Down

0 comments on commit da65fcf

Please sign in to comment.