[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [snowflake-mobile/master] Handled ICE connection failed state
commit fecb5fa01746bf4fc3541bb2da908751dd715ae8
Author: Hashik Donthineni <HashikDonthineni@xxxxxxxxx>
Date: Tue Jul 7 22:50:41 2020 +0530
Handled ICE connection failed state
---
.../main/java/org/torproject/snowflake/MyPeerConnectionObserver.java | 3 ++-
app/src/main/java/org/torproject/snowflake/MyPersistentService.java | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/app/src/main/java/org/torproject/snowflake/MyPeerConnectionObserver.java b/app/src/main/java/org/torproject/snowflake/MyPeerConnectionObserver.java
index 5d96dae..260833a 100644
--- a/app/src/main/java/org/torproject/snowflake/MyPeerConnectionObserver.java
+++ b/app/src/main/java/org/torproject/snowflake/MyPeerConnectionObserver.java
@@ -26,7 +26,8 @@ public class MyPeerConnectionObserver implements PeerConnection.Observer {
@Override
public void onIceConnectionChange(PeerConnection.IceConnectionState iceConnectionState) {
Log.d(TAG, "onIceConnectionChange: " + iceConnectionState);
- //TODO:Handle Connection Failure.
+ if (iceConnectionState == PeerConnection.IceConnectionState.FAILED)
+ peerconnectionObserverCallback.iceConnectionFailed();
}
@Override
diff --git a/app/src/main/java/org/torproject/snowflake/MyPersistentService.java b/app/src/main/java/org/torproject/snowflake/MyPersistentService.java
index 07fc37c..c007e72 100644
--- a/app/src/main/java/org/torproject/snowflake/MyPersistentService.java
+++ b/app/src/main/java/org/torproject/snowflake/MyPersistentService.java
@@ -308,7 +308,8 @@ public class MyPersistentService extends Service {
@Override
public void iceConnectionFailed() {
Log.d(TAG, "iceConnectionFailed: ");
- //TODO: Figuring out with trac ticket.
+ //Connection is terminated when ICE connection reaches FAILED state.
+ closeConnections(true);
}
@Override
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits