Skip to content

Commit

Permalink
fix: Fix peer cleanup for offers
Browse files Browse the repository at this point in the history
  • Loading branch information
freehuntx committed Dec 26, 2023
1 parent 62aedc1 commit 11cfd7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions addons/matcha/MatchaRoom.gd
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ func _on_answer(answer: Dictionary, tracker_client: TrackerClient) -> void:
_offers.erase(answer.offer_id)

if answer.peer_id in _peers: return

offer.peer.disconnected.connect(self._cleanup_peer_id.bind(answer.peer_id))
offer.peer.connecting_failed.connect(self._cleanup_peer_id.bind(answer.peer_id))
_peers[answer.peer_id] = offer.peer
offer.peer.set_answer(answer.sdp)

Expand Down

0 comments on commit 11cfd7a

Please sign in to comment.