Replacing unnecessary conditional with DCHECK in OpenSSLAdapter
Follow-up from https://codereview.webrtc.org/2915243002/ BUG=None TBR=pthatcher@webrtc.org Review-Url: https://codereview.webrtc.org/2917933003 Cr-Commit-Position: refs/heads/master@{#18418}
This commit is contained in:
parent
9641c13327
commit
e5dce2b6b9
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user