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_);
if(ssl_) {
SSL_set_shutdown(ssl_, SSL_RECEIVED_SHUTDOWN);
SSL_shutdown(ssl_);
}
if(bev_) {

View File

@ -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) {

View File

@ -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);

View File

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