[tor-commits] [snowflake-mobile/master] Moved creation of PeerConnection to offerRequestSuccess

cohosh at torproject.org cohosh at torproject.org
Mon Jul 13 20:29:57 UTC 2020


commit 492e7648eb72935b179f987d8b88269ac4ea084e
Author: Hashik Donthineni <HashikDonthineni at gmail.com>
Date:   Thu Jul 9 22:44:46 2020 +0530

    Moved creation of PeerConnection to offerRequestSuccess
---
 app/src/main/java/org/torproject/snowflake/MyPersistentService.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/src/main/java/org/torproject/snowflake/MyPersistentService.java b/app/src/main/java/org/torproject/snowflake/MyPersistentService.java
index 6e5fe23..7654997 100644
--- a/app/src/main/java/org/torproject/snowflake/MyPersistentService.java
+++ b/app/src/main/java/org/torproject/snowflake/MyPersistentService.java
@@ -238,7 +238,6 @@ public class MyPersistentService extends Service {
     private void startWebRTCConnection() {
         Log.d(TAG, "startWebRTCConnection: Starting Connection.");
         initializePeerConnectionFactory(); //Android Specific, you can Ignore.
-        mainPeerConnection = createPeerConnection(factory); //Creating New Peer Connection.
         compositeDisposable.add(
                 //First argument is initialDelay, Second argument is the time after which it has to repeat.
                 Observable.interval(1, 5, TimeUnit.SECONDS)
@@ -392,6 +391,8 @@ public class MyPersistentService extends Service {
      * @param sdpOfferResponse
      */
     public void offerRequestSuccess(SDPOfferResponse sdpOfferResponse) {
+        //Creating New Peer Connection.
+        mainPeerConnection = createPeerConnection(factory);
         updateNotification("Fetching offer success. Creating Answer.");
         if (sdpOfferResponse.getStatus().equals(BrokerConstants.CLIENT_MATCH)) {
             updateNotification("Client match, generating answer...");





More information about the tor-commits mailing list