[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 492e7648eb72935b179f987d8b88269ac4ea084e
Author: Hashik Donthineni <HashikDonthineni@xxxxxxxxx>
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...");



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits