mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
1.Use std::move to initialize std::thread; 2.Fix thread cannot exit error
This commit is contained in:
@@ -70,14 +70,15 @@ int CreateConnection(PeerPtr *peer_ptr, const char *transmission_id,
|
||||
|
||||
int JoinConnection(PeerPtr *peer_ptr, const char *transmission_id,
|
||||
const char *password) {
|
||||
int ret = -1;
|
||||
if (!peer_ptr) {
|
||||
LOG_ERROR("peer_ptr not created");
|
||||
return -1;
|
||||
}
|
||||
|
||||
peer_ptr->peer_connection->Join(transmission_id, password);
|
||||
ret = peer_ptr->peer_connection->Join(transmission_id, password);
|
||||
LOG_INFO("JoinConnection [{}] with password [{}]", transmission_id, password);
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int LeaveConnection(PeerPtr *peer_ptr) {
|
||||
|
||||
Reference in New Issue
Block a user