In CONNECT tunnels, the `datagram_flow_id` is `UINT64_MAX`, take that into account
@@ -394,10 +394,12 @@ static void destroy_tunnel(struct st_h2o_http3_server_stream_t *stream)
/* remove stream from datagram flow list */
struct st_h2o_http3_server_conn_t *conn = get_conn(stream);
+ if (stream->tunnel->datagram_flow_id != UINT64_MAX) {
khiter_t iter = kh_get(stream, conn->datagram_flows, stream->tunnel->datagram_flow_id);
assert(iter != kh_end(conn->datagram_flows));
kh_del(stream, conn->datagram_flows, iter);
}
+}
static void dispose_request(struct st_h2o_http3_server_stream_t *stream)
{
