Index: webrtc/base/openssladapter.cc |
diff --git a/webrtc/base/openssladapter.cc b/webrtc/base/openssladapter.cc |
index fbab6c84efbd9c8936926a80574d2874274a1050..e1d0a5802eef4cf019531ba3a0bde7acc491c957 100644 |
--- a/webrtc/base/openssladapter.cc |
+++ b/webrtc/base/openssladapter.cc |
@@ -565,8 +565,9 @@ OpenSSLAdapter::Send(const void* pv, size_t cb) { |
// buffer the data ourselves. When we know the underlying socket is writable |
// again from OnWriteEvent (or if Send is called again before that happens), |
// we'll retry sending this buffered data. |
- if ((error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE) && |
- pending_data_.empty()) { |
+ if (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE) { |
+ // Shouldn't be able to get to this point if we already have pending data. |
+ RTC_DCHECK(pending_data_.empty()); |
LOG(LS_WARNING) |
<< "SSL_write couldn't write to the underlying socket; buffering data."; |
pending_data_.SetData(static_cast<const uint8_t*>(pv), cb); |