Remove remnants of blocking DTLS timeouts.
We only support non-blocking BIOs for DTLS as of
https://boringssl-review.googlesource.com/13945. This logic is a remnant
of that. It should not be necessary. All users of DTLSv1_get_timeout
call DTLSv1_handle_timeout. This gets it out of the way for
dtls_open_record calls which don't use dtls1_get_record.
We can restore it elsewhere if necessary, but I don't think we need it.
Change-Id: Idb737868358e4b59ad3cb2c994c7084ffcdb3709
Reviewed-on: https://boringssl-review.googlesource.com/21349
Commit-Queue: Steven Valdez <svaldez@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: Steven Valdez <svaldez@google.com>
diff --git a/ssl/d1_pkt.cc b/ssl/d1_pkt.cc
index 0c01532..0f1c407 100644
--- a/ssl/d1_pkt.cc
+++ b/ssl/d1_pkt.cc
@@ -143,18 +143,6 @@
// Read a new packet if there is no unconsumed one.
if (ssl_read_buffer(ssl).empty()) {
int read_ret = ssl_read_buffer_extend_to(ssl, 0 /* unused */);
- if (read_ret < 0 && dtls1_is_timer_expired(ssl)) {
- // Historically, timeouts were handled implicitly if the caller did not
- // handle them.
- //
- // TODO(davidben): This was to support blocking sockets but affected
- // non-blocking sockets. Can it be removed?
- int timeout_ret = DTLSv1_handle_timeout(ssl);
- if (timeout_ret <= 0) {
- return timeout_ret;
- }
- goto again;
- }
if (read_ret <= 0) {
return read_ret;
}