don't delay path response with the CWIN
@@ -203,22 +203,6 @@ protoop_arg_t schedule_frames(picoquic_cnx_t *cnx) {
}
}
- if (cwin > bytes_in_transit) {
- /* if present, send tls data */
- if (tls_ready) {
- ret = helper_prepare_crypto_hs_frame(cnx, 3, &bytes[length],
- send_buffer_min_max - checksum_overhead - length, &data_bytes);
-
- if (ret == 0) {
- length += (uint32_t)data_bytes;
- if (data_bytes > 0)
- {
- set_pkt(packet, AK_PKT_IS_PURE_ACK, 0);
- set_pkt(packet, AK_PKT_CONTAINS_CRYPTO, 1);
- set_pkt(packet, AK_PKT_IS_CONGESTION_CONTROLLED, 1);
- }
- }
- }
/* if present, send path response. This ensures we send it on the right path */
if (any_path_challenge_response_to_send) {
#define PICOQUIC_CHALLENGE_LENGTH 8
@@ -236,6 +220,23 @@ protoop_arg_t schedule_frames(picoquic_cnx_t *cnx) {
}
}
+ if (cwin > bytes_in_transit) {
+ /* if present, send tls data */
+ if (tls_ready) {
+ ret = helper_prepare_crypto_hs_frame(cnx, 3, &bytes[length],
+ send_buffer_min_max - checksum_overhead - length, &data_bytes);
+
+ if (ret == 0) {
+ length += (uint32_t)data_bytes;
+ if (data_bytes > 0)
+ {
+ set_pkt(packet, AK_PKT_IS_PURE_ACK, 0);
+ set_pkt(packet, AK_PKT_CONTAINS_CRYPTO, 1);
+ set_pkt(packet, AK_PKT_IS_CONGESTION_CONTROLLED, 1);
+ }
+ }
+ }
+
/* If present, send misc frame */
while (first_misc_frame != NULL) {
ret = helper_prepare_first_misc_frame(cnx, &bytes[length],
