nghttp: Fix crash on plain HTTP

This commit is contained in:
Tatsuhiro Tsujikawa 2014-01-08 02:15:46 +09:00
parent 0fb4d32d6a
commit ecc4290d3d
1 changed files with 28 additions and 26 deletions

View File

@ -1313,6 +1313,7 @@ void eventcb(bufferevent *bev, short events, void *ptr)
if(client->need_upgrade()) {
rv = client->on_upgrade_connect();
} else {
if(client->ssl) {
// Check NPN or ALPN result
const unsigned char *next_proto = nullptr;
unsigned int next_proto_len;
@ -1344,6 +1345,7 @@ void eventcb(bufferevent *bev, short events, void *ptr)
client->disconnect();
return;
}
}
rv = client->on_connect();
}
if(rv != 0) {