Chromium Code Reviews| Index: net/socket/ssl_client_socket_impl.cc |
| diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc |
| index 93153645d5a89c78a4996655ea1b22db83bed84d..8db5e2b0a2d4df67e86f15914046a39e09cf8b37 100644 |
| --- a/net/socket/ssl_client_socket_impl.cc |
| +++ b/net/socket/ssl_client_socket_impl.cc |
| @@ -1447,7 +1447,10 @@ int SSLClientSocketImpl::DoPayloadRead() { |
| user_read_buf_len_ - total_bytes_read); |
| if (ssl_ret > 0) |
| total_bytes_read += ssl_ret; |
| - } while (total_bytes_read < user_read_buf_len_ && ssl_ret > 0); |
| + // Continue processing records as long as there is more data available |
|
svaldez
2017/03/07 22:05:54
Move this comment before the do-while loop.
|
| + // synchronously. |
| + } while (total_bytes_read < user_read_buf_len_ && ssl_ret > 0 && |
| + transport_adapter_->HasPendingReadData()); |
| // Although only the final SSL_read call may have failed, the failure needs to |
| // processed immediately, while the information still available in OpenSSL's |