Changing from hard to soft error when temporary DTLS buffer is full.
We thought we had resolved this issue earlier, by reading DTLS records in a loop. But this condition may be triggered in other cases, such as when an internal DTLS error occurs and more DTLS records continue to be received afterwords. Changing this from a hard to soft error will avoid a crash (which is happening more frequently for whatever reason) and hopefully enable us to collect logs to debug the issue further. Bug: chromium:1063834 Change-Id: I22c01a9e064a9db65bab38d00c62a424b5a27437 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172560 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Jonas Oreland <jonaso@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30955}
This commit is contained in:
parent
7ee8a88064
commit
784630f0e6
@ -99,12 +99,15 @@ rtc::StreamResult StreamInterfaceChannel::Write(const void* data,
|
||||
}
|
||||
|
||||
bool StreamInterfaceChannel::OnPacketReceived(const char* data, size_t size) {
|
||||
// We force a read event here to ensure that we don't overflow our queue.
|
||||
bool ret = packets_.WriteBack(data, size, NULL);
|
||||
RTC_CHECK(ret) << "Failed to write packet to queue.";
|
||||
if (ret) {
|
||||
SignalEvent(this, rtc::SE_READ, 0);
|
||||
if (!ret) {
|
||||
// Somehow we received another packet before the SSLStreamAdapter read the
|
||||
// previous one out of our temporary buffer. In this case, we'll log an
|
||||
// error and still signal the read event, hoping that it will read the
|
||||
// packet currently in packets_.
|
||||
RTC_LOG(LS_ERROR) << "Failed to write packet to queue.";
|
||||
}
|
||||
SignalEvent(this, rtc::SE_READ, 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user