Skip to content

Commit 8483d59

Browse files
committed
Fix #13490 Cellular disconnect does not deactivate context
(for some cases)
1 parent a699ff3 commit 8483d59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

connectivity/cellular/source/framework/AT/AT_CellularContext.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ nsapi_error_t AT_CellularContext::find_and_activate_context()
544544
delete_current_context();
545545
} else if (err == NSAPI_ERROR_OK) {
546546
_is_context_active = true;
547+
_is_context_activated = true;
547548
}
548549

549550
_at.unlock();
@@ -757,8 +758,9 @@ void AT_CellularContext::check_and_deactivate_context()
757758
// For EPS, if an attempt is made to disconnect the last PDN connection, then the MT responds with ERROR
758759
if (_is_context_active && (rat < CellularNetwork::RAT_E_UTRAN || active_contexts_count > 1)) {
759760
_at.clear_error();
760-
deactivate_context();
761761
}
762+
763+
deactivate_context();
762764

763765
if (_new_context_set) {
764766
delete_current_context();

0 commit comments

Comments
 (0)