Stop the core when app is terminated to make sure the Main Core doesn't stay in Shutdown state, which would block the App Extension when receiving push notifications

This commit is contained in:
QuentinArguillere 2023-07-24 18:06:26 +02:00
parent 85bb79ce87
commit a3665c6af2

View file

@ -1556,8 +1556,11 @@ void popup_link_account_cb(LinphoneAccountCreator *creator, LinphoneAccountCreat
[ftd stopAndDestroyAndRemove:FALSE];
}
[_fileTransferDelegates removeAllObjects];
linphone_core_destroy(theLinphoneCore);
if (linphone_core_get_global_state(LC) != LinphoneGlobalOff) {
linphone_core_stop(LC);
}
linphone_core_unref(theLinphoneCore);
LOGI(@"Destroy linphonecore %p", theLinphoneCore);
theLinphoneCore = nil;