Skip to content

Commit 6065eed

Browse files
Don't return SSL_ERROR_SYSCALL for EOF
1 parent 7779551 commit 6065eed

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
@@ -1374,14 +1374,8 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
13741374
return SSL_ERROR_SSL;
13751375
}
13761376

1377-
if (ret_code == 0) {
1378-
if (ssl->s3->rwstate == SSL_ERROR_ZERO_RETURN) {
1379-
return SSL_ERROR_ZERO_RETURN;
1380-
}
1381-
// An EOF was observed which violates the protocol, and the underlying
1382-
// transport does not participate in the error queue. Bubble up to the
1383-
// caller.
1384-
return SSL_ERROR_SYSCALL;
1377+
if (ret_code == 0 && ssl->s3->rwstate == SSL_ERROR_ZERO_RETURN) {
1378+
return SSL_ERROR_ZERO_RETURN;
13851379
}
13861380

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

0 commit comments

Comments
 (0)