Skip to content

Commit

Permalink
Don't connect to yourself
Browse files Browse the repository at this point in the history
This bug was introduced with the rebasing of the previous pull requests.
  • Loading branch information
erikdubbelboer committed Jun 18, 2024
1 parent 81d49b6 commit ac0994d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/signaling/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,10 @@ func (p *Peer) HandleJoinPacket(ctx context.Context, packet JoinPacket) error {
}

for _, otherID := range lobby.Peers {
if otherID == p.ID {
continue
}

err := p.RequestConnection(ctx, otherID)
if err != nil {
return err
Expand Down

0 comments on commit ac0994d

Please sign in to comment.