Check error for calls to preparePeerConnection

This commit is contained in:
Cecylia Bocovich 2021-08-26 12:41:20 -04:00
parent c8136f4534
commit 8c6f0dbae7

View file

@ -127,7 +127,9 @@ func (c *WebRTCPeer) connect(config *webrtc.Configuration, broker *BrokerChannel
log.Println(c.id, " connecting...")
// TODO: When go-webrtc is more stable, it's possible that a new
// PeerConnection won't need to be re-prepared each time.
c.preparePeerConnection(config)
if err := c.preparePeerConnection(config); err != nil {
return err
}
answer, err := broker.Negotiate(c.pc.LocalDescription())
if err != nil {
return err