Index: webrtc/p2p/base/transportcontroller.cc |
diff --git a/webrtc/p2p/base/transportcontroller.cc b/webrtc/p2p/base/transportcontroller.cc |
index f06a180088608301c7d73560a346b42383b69481..af4857a8b779c6ab0f72aa2f782e5f2292d2307d 100644 |
--- a/webrtc/p2p/base/transportcontroller.cc |
+++ b/webrtc/p2p/base/transportcontroller.cc |
@@ -602,7 +602,11 @@ bool TransportController::SetLocalTransportDescription_n( |
if (redetermine_role_on_ice_restart_ && transport->local_description() && |
IceCredentialsChanged(transport->local_description()->ice_ufrag, |
transport->local_description()->ice_pwd, |
- tdesc.ice_ufrag, tdesc.ice_pwd)) { |
+ tdesc.ice_ufrag, tdesc.ice_pwd) && |
+ // Don't change the ICE role if the remote endpoint is ICE lite; we |
+ // should always be controlling in that case. |
Zhi Huang
2017/04/12 21:32:59
Extreme minor thing. Since we are changing the ice
Taylor Brandstetter
2017/04/20 07:23:53
Done.
|
+ (!transport->remote_description() || |
+ transport->remote_description()->ice_mode == ICEMODE_FULL)) { |
IceRole new_ice_role = |
(action == CA_OFFER) ? ICEROLE_CONTROLLING : ICEROLE_CONTROLLED; |
SetIceRole(new_ice_role); |