Skip to content

Commit

Permalink
Optimize Socket::ssl_recv()
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Mar 27, 2024
1 parent df3f3e3 commit bc68561
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/network/socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1343,8 +1343,7 @@ ssize_t Socket::ssl_recv(void *__buf, size_t __n) {
return SW_ERR;

case SSL_ERROR_SYSCALL:
errno = SW_ERROR_SSL_RESET;
return SW_ERR;
return errno == 0 ? 0 : SW_ERR;

case SSL_ERROR_SSL:
ssl_catch_error();
Expand Down

0 comments on commit bc68561

Please sign in to comment.