Skip to content

Commit 0a46788

Browse files
committed
GEMALTO CINTERION: cleanup stack before connection
Allows to re-connect after a disconnection
1 parent 933694e commit 0a46788

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularContext.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ nsapi_error_t GEMALTO_CINTERION_CellularContext::connect(const char *sim_pin, co
3535
{
3636
nsapi_error_t error = NSAPI_ERROR_OK;
3737

38+
if (_stack) {
39+
delete _stack;
40+
_stack = NULL;
41+
}
42+
3843
set_sim_pin(sim_pin);
3944
set_credentials(apn, uname, pwd);
4045

0 commit comments

Comments
 (0)