Skip to content

Commit

Permalink
connect 直後に disconnect すると落ちるのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
melpon committed Jun 26, 2023
1 parent 2d02595 commit 3c96263
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SORA_CPP_SDK_VERSION=2023.6.0
SORA_CPP_SDK_VERSION=2023.7.1
WEBRTC_BUILD_VERSION=m114.5735.2.0
BOOST_VERSION=1.82.0
LYRA_VERSION=1.3.0
Expand Down
9 changes: 1 addition & 8 deletions src/sora_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,7 @@ void SoraConnection::Disconnect() {
if (thread_) {
// Disconnect の中で OnDisconnect が呼ばれるので GIL をリリースする
nb::gil_scoped_release release;
if (conn_->GetPeerConnection() != nullptr) {
// 切断済みではない場合は切断する
//
// TODO(sile): ioc_ が別スレッドで動作している関係上、上のチェックでは完璧ではなくレースコンディションが存在するはず
// レースコンディションを完全になくすためには C++ SDK 側での対応が必要なものと思われる
// (e.g., 切断済みの場合に conn_->Disconnect() が呼ばれた場合には単に無視する仕様にする、など)
conn_->Disconnect();
}
conn_->Disconnect();
thread_->join();
thread_ = nullptr;
}
Expand Down

0 comments on commit 3c96263

Please sign in to comment.