nghttp: Fix crash on plain HTTP
This commit is contained in:
parent
0fb4d32d6a
commit
ecc4290d3d
|
@ -1313,6 +1313,7 @@ void eventcb(bufferevent *bev, short events, void *ptr)
|
||||||
if(client->need_upgrade()) {
|
if(client->need_upgrade()) {
|
||||||
rv = client->on_upgrade_connect();
|
rv = client->on_upgrade_connect();
|
||||||
} else {
|
} else {
|
||||||
|
if(client->ssl) {
|
||||||
// Check NPN or ALPN result
|
// Check NPN or ALPN result
|
||||||
const unsigned char *next_proto = nullptr;
|
const unsigned char *next_proto = nullptr;
|
||||||
unsigned int next_proto_len;
|
unsigned int next_proto_len;
|
||||||
|
@ -1344,6 +1345,7 @@ void eventcb(bufferevent *bev, short events, void *ptr)
|
||||||
client->disconnect();
|
client->disconnect();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
rv = client->on_connect();
|
rv = client->on_connect();
|
||||||
}
|
}
|
||||||
if(rv != 0) {
|
if(rv != 0) {
|
||||||
|
|
Loading…
Reference in New Issue