Skip to content

Commit

Permalink
Make the closing of connection backwards compatible.
Browse files Browse the repository at this point in the history
  • Loading branch information
koenbollen committed Aug 30, 2023
1 parent 06ddfc1 commit 4a6b82d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/signaling/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ func (p *Peer) HandlePacket(ctx context.Context, typ string, raw []byte) error {
return fmt.Errorf("unable to handle packet: %w", err)
}

case "leave": // legacy, backwards compatibility
fallthrough
case "close":
packet := ClosePacket{}
if err := json.Unmarshal(raw, &packet); err != nil {
Expand Down

0 comments on commit 4a6b82d

Please sign in to comment.