Improve resource cleanup on connection close (and make server API a unique pointer) (#9799)
* Improve resource cleanup on connection close * Copilot had some good feedback. Let's just make the api a unique pointer * Update src/mesh/api/ServerAPI.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Copilot stupidly suggesting we call protected methods * Gotta do it in the superclasses as well * Fix moar * Refactor MQTT unit test to ensure proper subscription handling and clear side effects --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
GitHub
Copilot
parent
eb2f3cef89
commit
3601eabbf8
@@ -122,6 +122,8 @@ void PhoneAPI::close()
|
||||
}
|
||||
packetForPhone = NULL;
|
||||
filesManifest.clear();
|
||||
filesManifest.shrink_to_fit();
|
||||
lastPortNumToRadio.clear();
|
||||
fromRadioNum = 0;
|
||||
config_nonce = 0;
|
||||
config_state = 0;
|
||||
|
||||
Reference in New Issue
Block a user