src: Call SSL_set_shutdown(ssl, SSL_RECEIVED_SHUTDOWN)

This commit is contained in:
Tatsuhiro Tsujikawa 2014-01-08 23:32:47 +09:00
parent dacfecf41a
commit c36ce28f69
4 changed files with 4 additions and 0 deletions

View File

@ -193,6 +193,7 @@ Http2Handler::~Http2Handler()
} }
nghttp2_session_del(session_); nghttp2_session_del(session_);
if(ssl_) { if(ssl_) {
SSL_set_shutdown(ssl_, SSL_RECEIVED_SHUTDOWN);
SSL_shutdown(ssl_); SSL_shutdown(ssl_);
} }
if(bev_) { if(bev_) {

View File

@ -553,6 +553,7 @@ struct HttpClient {
session = nullptr; session = nullptr;
if(ssl) { if(ssl) {
fd = SSL_get_fd(ssl); fd = SSL_get_fd(ssl);
SSL_set_shutdown(ssl, SSL_RECEIVED_SHUTDOWN);
SSL_shutdown(ssl); SSL_shutdown(ssl);
} }
if(bev) { if(bev) {

View File

@ -251,6 +251,7 @@ ClientHandler::~ClientHandler()
CLOG(INFO, this) << "Deleting"; CLOG(INFO, this) << "Deleting";
} }
if(ssl_) { if(ssl_) {
SSL_set_shutdown(ssl_, SSL_RECEIVED_SHUTDOWN);
SSL_shutdown(ssl_); SSL_shutdown(ssl_);
} }
bufferevent_disable(bev_, EV_READ | EV_WRITE); bufferevent_disable(bev_, EV_READ | EV_WRITE);

View File

@ -82,6 +82,7 @@ int Http2Session::disconnect()
} }
if(ssl_) { if(ssl_) {
SSL_set_shutdown(ssl_, SSL_RECEIVED_SHUTDOWN);
SSL_shutdown(ssl_); SSL_shutdown(ssl_);
} }
if(bev_) { if(bev_) {