nghttpx: Fix crash on upgrade success

This commit is contained in:
Tatsuhiro Tsujikawa 2013-09-26 21:39:19 +09:00
parent 825c1bac6b
commit c5912341ad
1 changed files with 2 additions and 0 deletions

View File

@ -436,6 +436,8 @@ int ClientHandler::perform_http2_upgrade(HttpsUpstream *http)
if(upstream->upgrade_upstream(http) != 0) {
return -1;
}
// http pointer is now owned by upstream.
upstream_.release();
upstream_ = std::move(upstream);
set_bev_cb(upstream_http2_connhd_readcb, upstream_writecb, upstream_eventcb);
static char res[] = "HTTP/1.1 101 Switching Protocols\r\n"