PengZheng commented on code in PR #583: URL: https://github.com/apache/celix/pull/583#discussion_r1250067549
########## libs/framework/src/framework.c: ########## @@ -1179,37 +1168,22 @@ static void* framework_shutdown(void *framework) { 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); - - //NOTE possible starvation. - fw_bundleEntry_waitTillUseCountIs(entry, 1); //note this function has 1 use count. - - 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); } celix_arrayList_destroy(stopEntries); - // 'stop' framework bundle + // make sure the framework has been stopped if (fwEntry != NULL) { - bundle_t *bnd = fwEntry->bnd; - fw_bundleEntry_waitTillUseCountIs(fwEntry, 1); //note this function has 1 use count. - - bundle_state_e state; - bundle_getState(bnd, &state); - if (state == CELIX_BUNDLE_STATE_ACTIVE || state == CELIX_BUNDLE_STATE_STARTING) { - celix_framework_stopBundleEntry(fw, fwEntry); Review Comment: This is never called, and thus is removed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org