Skip to content

Commit

Permalink
WebSocket.readyState の状態チェックを行わない状態に戻す
Browse files Browse the repository at this point in the history
  • Loading branch information
tnamao committed May 17, 2024
1 parent 319e0dc commit c92a092
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

## develop

- [FIX] WebSocket 接続直後に Sora 側から切断された際にシグナリング開始のメッセージを送ってしまう問題を修正する
- WebSocket の readyState の状態チェックを追加した
- @tnamao
- [UPDATE] tsconfig.json を統一する
- @voluntas
- [UPDATE] CI の pnpm を 9 に上げる
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ export default class ConnectionBase {
signalingMessage.signaling_notify_metadata.pre_key_bundle = initResult
}
this.trace('SIGNALING CONNECT MESSAGE', signalingMessage)
if (ws && ws.readyState === WebSocket.OPEN) {
if (ws) {
ws.send(JSON.stringify(signalingMessage))
this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage)
this.ws = ws
Expand Down

0 comments on commit c92a092

Please sign in to comment.