Chromium Code Reviews| Index: net/socket/ssl_client_socket_openssl.cc |
| diff --git a/net/socket/ssl_client_socket_openssl.cc b/net/socket/ssl_client_socket_openssl.cc |
| index aa45a9d3a830260837568207fbac8c666e25c01a..b44ea4c64f7061e4b1c0829bf1480e8d91c9bd1c 100644 |
| --- a/net/socket/ssl_client_socket_openssl.cc |
| +++ b/net/socket/ssl_client_socket_openssl.cc |
| @@ -1358,6 +1358,12 @@ int SSLClientSocketOpenSSL::DoPayloadRead() { |
| } else if (*next_result < 0) { |
| int err = SSL_get_error(ssl_, *next_result); |
| *next_result = MapOpenSSLError(err, err_tracer); |
| + |
| + // Servers do not reliably send close_notify, so |
| + // ERR_CONNECTION_CLOSED cannot be treated as fatal. |
|
Ryan Sleevi
2014/10/17 20:53:00
This comment needs explaining (or my flu meds need
davidben
2014/10/20 17:13:24
Done.
|
| + if (*next_result == ERR_CONNECTION_CLOSED) |
| + *next_result = 0; |
| + |
| if (rv > 0 && *next_result == ERR_IO_PENDING) { |
| // If at least some data was read from SSL_read(), do not treat |
| // insufficient data as an error to return in the next call to |