[tor-commits] [snowflake/main] Check error for calls to preparePeerConnection

cohosh at torproject.org cohosh at torproject.org
Thu Sep 30 15:47:30 UTC 2021


commit 8c6f0dbae714908094b828e6f31e9729a6daafe5
Author: Cecylia Bocovich <cohosh at 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



More information about the tor-commits mailing list