Fix TLS error handling

This commit is contained in:
Flander Bojan 2022-11-11 11:20:42 +00:00 committed by Sukchan Lee
parent 141c345b75
commit 4ba90fbd3b
1 changed files with 3 additions and 4 deletions

View File

@ -598,7 +598,7 @@ static void session_remove(ogs_sbi_session_t *sbi_sess)
stream_remove_all(sbi_sess);
nghttp2_session_del(sbi_sess->session);
ogs_assert(sbi_sess->poll.read);
if (sbi_sess->poll.read)
ogs_pollset_remove(sbi_sess->poll.read);
if (sbi_sess->poll.write)
@ -667,7 +667,6 @@ static void accept_handler(short when, ogs_socket_t fd, void *data)
err = SSL_accept(sbi_sess->ssl);
if (err <= 0) {
ogs_error("SSL_accept failed: %s", ERR_error_string(ERR_get_error(), NULL));
ogs_sock_destroy(new);
session_remove(sbi_sess);
return;
}