Skip to content

Commit

Permalink
Fix empty remote for webrtc
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Aug 21, 2022
1 parent 7a3a1a5 commit 863bf50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/webrtc/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ func (c *Conn) GetCompleteAnswer() (answer string, err error) {
func (c *Conn) remote() string {
for _, trans := range c.Conn.GetTransceivers() {
pair, _ := trans.Receiver().Transport().ICETransport().GetSelectedCandidatePair()
return pair.Remote.String()
if pair.Remote != nil {
return pair.Remote.String()
}
}
return ""
}

0 comments on commit 863bf50

Please sign in to comment.