mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
Add destroy method for peer instance
This commit is contained in:
@@ -39,6 +39,12 @@ PeerPtr *CreatePeer(const Params *params) {
|
||||
return peer_ptr;
|
||||
}
|
||||
|
||||
void DestroyPeer(PeerPtr *peer_ptr) {
|
||||
peer_ptr->peer_connection->Destroy();
|
||||
delete peer_ptr;
|
||||
peer_ptr = nullptr;
|
||||
}
|
||||
|
||||
int Init(PeerPtr *peer_ptr, const char *user_id) {
|
||||
if (!peer_ptr) {
|
||||
LOG_ERROR("peer_ptr not created");
|
||||
|
||||
Reference in New Issue
Block a user