Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Unified Diff: webrtc/base/openssladapter.cc

Issue 2917933003: Replacing unnecessary conditional with DCHECK in OpenSSLAdapter (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698