Skip to content

Commit 85c669f

Browse files
Make source change more readable
1 parent 0457256 commit 85c669f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

ssl/ssl_lib.cc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,11 +1388,13 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
13881388
}
13891389
// An EOF was observed which violates the protocol, and the underlying
13901390
// transport does not participate in the error queue. If
1391-
// |SSL_MODE_AUTO_RETRY| is unset or we're in a non-retryable state, bubble
1392-
// up to the caller.
1393-
if ((ssl->ctx->mode & SSL_MODE_AUTO_RETRY) == 0
1394-
|| (ssl->s3->rwstate != SSL_ERROR_WANT_READ
1395-
&& ssl->s3->rwstate != SSL_ERROR_WANT_WRITE)) {
1391+
// |SSL_MODE_AUTO_RETRY| is unset, bubble up to the caller.
1392+
if ((ssl->ctx->mode & SSL_MODE_AUTO_RETRY) == 0) {
1393+
return SSL_ERROR_SYSCALL;
1394+
}
1395+
// If |SSL_MODE_AUTO_RETRY| is set, proceed if in a retryable state.
1396+
if (ssl->s3->rwstate != SSL_ERROR_WANT_READ
1397+
&& ssl->s3->rwstate != SSL_ERROR_WANT_WRITE) {
13961398
return SSL_ERROR_SYSCALL;
13971399
}
13981400
}

0 commit comments

Comments
 (0)