Skip to content

Commit

Permalink
[+] add flag for state cids_blocked has been sent
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanmei-Liu committed Jan 28, 2025
1 parent 0c381d4 commit 1980c17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/transport/xqc_cid.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ typedef struct xqc_cid_set_inner_s {
};
xqc_cid_set_state_t set_state;
uint32_t acked_unused;
uint32_t cids_blocked_sent;
} xqc_cid_set_inner_t;

typedef struct xqc_cid_set_s {
Expand Down
3 changes: 2 additions & 1 deletion src/transport/xqc_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,11 +743,12 @@ xqc_engine_process_conn(xqc_connection_t *conn, xqc_usec_t now)
/* not enough cid for new path id */
uint64_t path_id = conn->create_path_count;
xqc_cid_set_inner_t *dcid_inner_set = xqc_get_path_cid_set(&conn->dcid_set, path_id);
if (dcid_inner_set && dcid_inner_set->unused_cnt == 0) {
if (dcid_inner_set && dcid_inner_set->unused_cnt == 0 && !dcid_inner_set->cids_blocked_sent) {
rc = xqc_write_path_cids_blocked_to_packet(conn, path_id);
if (rc) {
xqc_log(conn->log, XQC_LOG_WARN, "|xqc_write_path_cids_blocked_to_packet error|ret:%ui|", ret);
}
dcid_inner_set->cids_blocked_sent = 1;
}
}

Expand Down

0 comments on commit 1980c17

Please sign in to comment.