We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0565d8d commit 9a6ca26Copy full SHA for 9a6ca26
1 file changed
src/brpc/socket.cpp
@@ -2106,12 +2106,14 @@ ssize_t Socket::DoRead(size_t size_hint) {
2106
<< ": " << SSLError(e);
2107
errno = ESSL;
2108
} else {
2109
+ int saved_errno = errno;
2110
// System error with corresponding errno set.
2111
bool is_fatal_error = (ssl_error != SSL_ERROR_ZERO_RETURN &&
2112
ssl_error != SSL_ERROR_SYSCALL) ||
- BIO_fd_non_fatal_error(errno) != 0 ||
2113
+ BIO_fd_non_fatal_error(saved_errno) != 0 ||
2114
nr < 0;
2115
PLOG_IF(WARNING, is_fatal_error) << "Fail to read from ssl_fd=" << fd();
2116
+ errno = saved_errno;
2117
}
2118
break;
2119
0 commit comments