diff --git a/src/HttpServer.cc b/src/HttpServer.cc index e112edd5..d11c23bb 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -193,6 +193,7 @@ Http2Handler::~Http2Handler() } nghttp2_session_del(session_); if(ssl_) { + SSL_set_shutdown(ssl_, SSL_RECEIVED_SHUTDOWN); SSL_shutdown(ssl_); } if(bev_) { diff --git a/src/nghttp.cc b/src/nghttp.cc index ce73a3cc..b0079285 100644 --- a/src/nghttp.cc +++ b/src/nghttp.cc @@ -553,6 +553,7 @@ struct HttpClient { session = nullptr; if(ssl) { fd = SSL_get_fd(ssl); + SSL_set_shutdown(ssl, SSL_RECEIVED_SHUTDOWN); SSL_shutdown(ssl); } if(bev) { diff --git a/src/shrpx_client_handler.cc b/src/shrpx_client_handler.cc index 396eab62..3abee131 100644 --- a/src/shrpx_client_handler.cc +++ b/src/shrpx_client_handler.cc @@ -251,6 +251,7 @@ ClientHandler::~ClientHandler() CLOG(INFO, this) << "Deleting"; } if(ssl_) { + SSL_set_shutdown(ssl_, SSL_RECEIVED_SHUTDOWN); SSL_shutdown(ssl_); } bufferevent_disable(bev_, EV_READ | EV_WRITE); diff --git a/src/shrpx_http2_session.cc b/src/shrpx_http2_session.cc index fb2fdffd..b75ae583 100644 --- a/src/shrpx_http2_session.cc +++ b/src/shrpx_http2_session.cc @@ -82,6 +82,7 @@ int Http2Session::disconnect() } if(ssl_) { + SSL_set_shutdown(ssl_, SSL_RECEIVED_SHUTDOWN); SSL_shutdown(ssl_); } if(bev_) {