Skip to content

Commit

Permalink
TODOコメントを追加する
Browse files Browse the repository at this point in the history
  • Loading branch information
zztkm committed Mar 3, 2025
1 parent af814fc commit 950ccf1
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class SignalingChannelImpl @JvmOverloads constructor(

companion object {
private val TAG = SignalingChannelImpl::class.simpleName
// TODO(zztkm): タイムアウト値を外部から設定できるようにするか検討する
private const val DISCONNECT_TIMEOUT_MS = 5000L // 5 秒のタイムアウト
}

Expand Down Expand Up @@ -252,6 +253,7 @@ class SignalingChannelImpl @JvmOverloads constructor(
webSocket.close(1000, null)

// WebSocketのcloseが完了するのを待つ
// TODO(zztkm): main スレッドをブロックしてる可能性があるので、問題がないか確認する
return runBlocking(Dispatchers.IO) {
try {
// onClosedが呼ばれるのを最大DISCONNECT_TIMEOUT_MSミリ秒待つ
Expand Down

0 comments on commit 950ccf1

Please sign in to comment.