mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
[fix] fix crash: ice worker still has IceWorkMsg::Type::Destroy msg which has not been processed when try to stop ice worker
This commit is contained in:
@@ -68,8 +68,7 @@ struct IceWorkMsg {
|
||||
UserLeaveTransmission,
|
||||
Offer,
|
||||
Answer,
|
||||
NewCandidate,
|
||||
Destroy
|
||||
NewCandidate
|
||||
};
|
||||
|
||||
Type type;
|
||||
@@ -97,6 +96,8 @@ class PeerConnection {
|
||||
|
||||
int Leave(const std::string &transmission_id);
|
||||
|
||||
int ReleaseAllIceTransmission();
|
||||
|
||||
int Destroy();
|
||||
|
||||
SignalStatus GetSignalStatus();
|
||||
@@ -201,7 +202,9 @@ class PeerConnection {
|
||||
std::atomic<bool> ice_worker_running_{true};
|
||||
std::queue<IceWorkMsg> ice_work_msg_queue_;
|
||||
std::condition_variable ice_work_cv_;
|
||||
std::condition_variable empty_notify_cv_;
|
||||
std::mutex ice_work_mutex_;
|
||||
std::mutex empty_notify_mutex_;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user