Skip to content

Commit 06f9cc4

Browse files
Don't return SSL_ERROR_SYSCALL for EOF
1 parent 9a05041 commit 06f9cc4

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

ssl/ssl_lib.cc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,14 +1369,8 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
13691369
return SSL_ERROR_SSL;
13701370
}
13711371

1372-
if (ret_code == 0) {
1373-
if (ssl->s3->rwstate == SSL_ERROR_ZERO_RETURN) {
1374-
return SSL_ERROR_ZERO_RETURN;
1375-
}
1376-
// An EOF was observed which violates the protocol, and the underlying
1377-
// transport does not participate in the error queue. Bubble up to the
1378-
// caller.
1379-
return SSL_ERROR_SYSCALL;
1372+
if (ret_code == 0 && ssl->s3->rwstate == SSL_ERROR_ZERO_RETURN) {
1373+
return SSL_ERROR_ZERO_RETURN;
13801374
}
13811375

13821376
switch (ssl->s3->rwstate) {

0 commit comments

Comments
 (0)