In cellular api's _is_connected flag is private and is used in do_connect function and do_connect is virtual. How child classes can use this flag, _is_connected. when do_connect is overridden child classes.
Also when do_connect is overridden then we cannot set this flag, _is_connected . So while calling do_disconnect because of _is_connected this check become true and sets _cid = -1 and when deactivate_context function is called give error. It will be better to add some method to set _is_connected.
[INFO][CELL]: AT TX (11): AT+CGACT=0,
[INFO][CELL]: AT TX ( 2): -1
[INFO][CELL]: AT TX ( 1):
[INFO][CELL]: AT RX ( 9): ERROR
Issue request type
[ ] Question
[ ] Enhancement
[x] Bug