Commit 53271e1e authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttp: Close fd on disconnect

parent c4539046
......@@ -547,10 +547,12 @@ struct HttpClient {
void disconnect()
{
int fd = -1;
state = STATE_IDLE;
nghttp2_session_del(session);
session = nullptr;
if(ssl) {
fd = SSL_get_fd(ssl);
SSL_shutdown(ssl);
}
if(bev) {
......@@ -570,6 +572,10 @@ struct HttpClient {
SSL_free(ssl);
ssl = nullptr;
}
if(fd != -1) {
shutdown(fd, SHUT_WR);
close(fd);
}
}
int on_upgrade_connect()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment