Skip to content

Commit

Permalink
[!] fix RETIRE_CID error when suffering severe loss
Browse files Browse the repository at this point in the history
  • Loading branch information
Kulsk committed Apr 22, 2024
1 parent 6c0d234 commit 6587daa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/transport/xqc_cid.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ xqc_int_t
xqc_cid_switch_to_next_state(xqc_cid_set_t *cid_set, xqc_cid_inner_t *cid, xqc_cid_state_t next_state)
{
if (xqc_cid_in_cid_set(cid_set, &cid->cid) == NULL) {
return -XQC_ECONN_CID_NOT_FOUND;
return XQC_OK;
}

xqc_cid_state_t current_state = cid->state;
Expand All @@ -259,7 +259,7 @@ xqc_cid_switch_to_next_state(xqc_cid_set_t *cid_set, xqc_cid_inner_t *cid, xqc_c
return XQC_OK;

} else if (current_state > next_state) {
return -XQC_ECID_STATE;
return XQC_OK;
}

/* current_state < next_state */
Expand Down
2 changes: 1 addition & 1 deletion src/transport/xqc_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -4475,7 +4475,7 @@ xqc_conn_set_cid_retired_ts(xqc_connection_t *conn, xqc_cid_inner_t *inner_cid)

ret = xqc_cid_switch_to_next_state(&conn->scid_set.cid_set, inner_cid, XQC_CID_RETIRED);
if (ret != XQC_OK) {
xqc_log(conn->log, XQC_LOG_ERROR, "|set cid retired error|");
xqc_log(conn->log, XQC_LOG_ERROR, "|set cid retired error|ret:%d", ret);
return ret;
}

Expand Down

0 comments on commit 6587daa

Please sign in to comment.