Index: webrtc/p2p/base/dtlstransportchannel.cc |
diff --git a/webrtc/p2p/base/dtlstransportchannel.cc b/webrtc/p2p/base/dtlstransportchannel.cc |
index d25de260f380693a3c8bd25312e42c1fbc3b53b7..2880200fefee9451929bbe9da237487451becb88 100644 |
--- a/webrtc/p2p/base/dtlstransportchannel.cc |
+++ b/webrtc/p2p/base/dtlstransportchannel.cc |
@@ -247,6 +247,10 @@ bool DtlsTransportChannelWrapper::SetRemoteFingerprint( |
if (reconnect) { |
Reconnect(); |
+ } else { |
+ // If the underlying channel is already writable by the time we receive |
+ // a remote fingerprint, we may be able to start DTLS right away. |
+ MaybeStartDtls(); |
skvlad
2016/07/12 21:53:52
The other two calls wrap this in VERIFY() - do you
pthatcher1
2016/07/13 00:04:19
If the other call is inlined, then there would jus
Taylor Brandstetter
2016/07/13 16:17:41
If we always want to DCHECK that this succeeds, I'
|
} |
return true; |
@@ -675,9 +679,7 @@ void DtlsTransportChannelWrapper::OnChannelStateChanged( |
void DtlsTransportChannelWrapper::Reconnect() { |
set_dtls_state(DTLS_TRANSPORT_NEW); |
pthatcher1
2016/07/13 00:04:19
Maybe have a DCHECK(dtls_active_);
Taylor Brandstetter
2016/07/13 16:17:41
No longer necessary. This is inlined in SetRemoteF
|
set_writable(false); |
- if (channel_->writable()) { |
- OnWritableState(channel_); |
- } |
+ VERIFY(MaybeStartDtls()); |
pthatcher1
2016/07/13 00:04:19
Can we inline this?
Taylor Brandstetter
2016/07/13 16:17:41
Done.
|
} |
} // namespace cricket |