Skip to content

Commit

Permalink
fix(ice): delete candidates after processing
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev committed Nov 25, 2020
1 parent cd896a6 commit a405fa7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ func (p *Publisher) Answer(offer webrtc.SessionDescription) (webrtc.SessionDescr

for _, c := range p.candidates {
p.pc.AddICECandidate(c)
p.candidates = nil
}
p.candidates = nil

answer, err := p.pc.CreateAnswer(nil)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ func (s *Subscriber) SetRemoteDescription(desc webrtc.SessionDescription) error

for _, c := range s.candidates {
s.pc.AddICECandidate(c)
s.candidates = nil
}
s.candidates = nil

return nil
}
Expand Down

0 comments on commit a405fa7

Please sign in to comment.