Improve error handling for AsyncSSLSocket::OnConnectEvent
Don't DCHECK that network send is successful, it may fail, e.g., EPIPE if remote end has disconnected. Bug: None Change-Id: I7ccff072420498b60fe16598110da91b01bfe7cb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229384 Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34821}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
849347bb4e
commit
b0cb4d1b5d
@ -182,7 +182,10 @@ void AsyncSSLSocket::OnConnectEvent(Socket* socket) {
|
||||
RTC_DCHECK(socket == GetSocket());
|
||||
// TODO: we could buffer output too...
|
||||
const int res = DirectSend(kSslClientHello, sizeof(kSslClientHello));
|
||||
RTC_DCHECK_EQ(sizeof(kSslClientHello), res);
|
||||
if (res != sizeof(kSslClientHello)) {
|
||||
Close();
|
||||
SignalCloseEvent(this, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void AsyncSSLSocket::ProcessInput(char* data, size_t* len) {
|
||||
|
Reference in New Issue
Block a user