|
|
|
|
@ -700,7 +700,7 @@ static void etcp_conn_process_send_queue(struct ETCP_CONN* etcp) {// вызыв
|
|
|
|
|
char l_status[256]={0}; |
|
|
|
|
struct ETCP_LINK* link = etcp->links; |
|
|
|
|
while (link) { |
|
|
|
|
snprintf (l_status+strlen(l_status), 256-strlen(l_status), "L%d%d%c ", link->recv_keepalive, link->remote_keepalive, (link->shaper_timer==0)?'R':'W'); |
|
|
|
|
snprintf (l_status+strlen(l_status), 256-strlen(l_status), "L%d%d%s,%s ", link->recv_keepalive, link->remote_keepalive, (link->shaper_timer==0)?"wait":"rdy", link->send_blocked_inflight?"inf_block":"rdy"); |
|
|
|
|
link = link->next; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -763,6 +763,7 @@ struct ETCP_DGRAM* etcp_request_pkt(struct ETCP_CONN* etcp) {
|
|
|
|
|
inf_pkt->last_link->total_retransmissions++; |
|
|
|
|
inf_pkt->last_link->inflight_bytes -= inf_pkt->ll.len; |
|
|
|
|
inf_pkt->last_link->inflight_packets--; |
|
|
|
|
if (link->send_blocked_inflight && link->inflight_bytes < link->inflight_lim_bytes) loadbalancer_link_ready(link); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Always add to the CURRENT link (first send or retransmission)
|
|
|
|
|
@ -970,14 +971,9 @@ void etcp_ack_recv(struct ETCP_CONN* etcp, uint32_t seq, uint16_t ts, uint16_t d
|
|
|
|
|
|
|
|
|
|
// === NEW: subtract inflight from the LAST link the packet was sent on ===
|
|
|
|
|
if (acked_pkt->last_link) { |
|
|
|
|
// if (acked_pkt->last_link->inflight_bytes >= acked_pkt->ll.len) {
|
|
|
|
|
acked_pkt->last_link->inflight_bytes -= acked_pkt->ll.len; |
|
|
|
|
// } else {
|
|
|
|
|
// acked_pkt->last_link->inflight_bytes = 0;
|
|
|
|
|
// }
|
|
|
|
|
// if (acked_pkt->last_link->inflight_packets > 0) {
|
|
|
|
|
acked_pkt->last_link->inflight_packets--; |
|
|
|
|
// }
|
|
|
|
|
if (acked_pkt->last_link->send_blocked_inflight && acked_pkt->last_link->inflight_bytes < acked_pkt->last_link->inflight_lim_bytes) loadbalancer_link_ready(acked_pkt->last_link); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|