commit 8c6f0dbae714908094b828e6f31e9729a6daafe5
Author: Cecylia Bocovich <cohosh(a)torproject.org>
Date: Thu Aug 26 12:41:20 2021 -0400
Check error for calls to preparePeerConnection
---
client/lib/webrtc.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/client/lib/webrtc.go b/client/lib/webrtc.go
index 72a3d64..2f931ac 100644
--- a/client/lib/webrtc.go
+++ b/client/lib/webrtc.go
@@ -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