Skip to content

Commit

Permalink
MAISTRA-1166: Treat EAGAIN as SSL_ERROR_WANT_READ (#46)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Conner <kconner@redhat.com>
(cherry picked from commit d4bd4cfa0dc513e7833fbe117ba0b3479ef86038)

Signed-off-by: Brian Avery <bavery@redhat.com>
  • Loading branch information
brian-avery authored and twghu committed Jan 14, 2021
1 parent f55b54a commit 7543ae5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/extensions/transport_sockets/tls/ssl_socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,16 @@ Network::IoResult SslSocket::doRead(Buffer::Instance& read_buffer) {
break;
}
FALLTHRU;
case SSL_ERROR_SSL:
// If EAGAIN treat it as if it's SSL_ERROR_WANT_READ
if (errno == EAGAIN) {
break;
}
// fall through for other errors
case SSL_ERROR_WANT_WRITE:
// Renegotiation has started. We don't handle renegotiation so just fall through.
default:
drainErrorQueue();
drainErrorQueue(true);
action = PostIoAction::Close;
break;
}
Expand Down

0 comments on commit 7543ae5

Please sign in to comment.