HTTP/1 -> HTTP/2 upgrade path fd leak
On upgrade error, make sure we're closing the HTTP/1 socket before
giving control to the HTTP/2 error handling.
@@ -579,8 +579,10 @@ static void on_upgrade_complete(h2o_socket_t *socket, const char *err)
if (err == 0) {
sock = conn->sock;
reqsize = conn->_reqsize;
- }
close_connection(conn, 0);
+ } else {
+ close_connection(conn, 1);
+ }
cb(data, sock, reqsize);
}
