| Index: webrtc/api/peerconnection.cc
|
| diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
|
| index a47b2f2d8c55831f0ab80d4699d446d4ed3b1954..a85e6a2aa284a834dd1d4c6d8b9e286aedd359fb 100644
|
| --- a/webrtc/api/peerconnection.cc
|
| +++ b/webrtc/api/peerconnection.cc
|
| @@ -1279,9 +1279,16 @@ bool PeerConnection::SetConfiguration(const RTCConfiguration& configuration) {
|
| }
|
| }
|
|
|
| - // TODO(deadbeef): Shouldn't have to hop to the worker thread twice...
|
| + // TODO(deadbeef): Shouldn't have to hop to the network thread twice...
|
| session_->SetIceConfig(session_->ParseIceConfig(configuration));
|
|
|
| + // As described in JSEP, calling setConfiguration with new ICE servers or
|
| + // candidate policy must set a "needs-ice-restart" bit so that the next offer
|
| + // triggers an ICE restart which will pick up the changes.
|
| + if (configuration.servers != configuration_.servers ||
|
| + configuration.type != configuration_.type) {
|
| + session_->SetNeedsIceRestartFlag();
|
| + }
|
| configuration_ = configuration;
|
| return true;
|
| }
|
|
|