@@ -8357,9 +8357,12 @@ fn last_tx_data_larger_than_tx_data(
83578357 test_utils:: emit_flight ( & mut pipe. server ) . unwrap ( ) ;
83588358
83598359 // Server buffers some data, until send capacity limit reached.
8360+ // Buffer stream 8 first with 1200 bytes, then stream 4 gets remaining 800.
8361+ // This proves the first PTO packet sends NEW data from whichever stream
8362+ // is picked first (stream 8, due to lower sequence number).
83608363 let mut buf = [ 0 ; 1200 ] ;
8361- assert_eq ! ( pipe. server. stream_send( 4 , & buf, false ) , Ok ( 1200 ) ) ;
8362- assert_eq ! ( pipe. server. stream_send( 8 , & buf, false ) , Ok ( 800 ) ) ;
8364+ assert_eq ! ( pipe. server. stream_send( 8 , & buf, false ) , Ok ( 1200 ) ) ;
8365+ assert_eq ! ( pipe. server. stream_send( 4 , & buf, false ) , Ok ( 800 ) ) ;
83638366 assert_eq ! ( pipe. server. stream_send( 4 , & buf, false ) , Err ( Error :: Done ) ) ;
83648367
83658368 // Wait for PTO to expire.
@@ -8368,10 +8371,12 @@ fn last_tx_data_larger_than_tx_data(
83688371
83698372 pipe. server . on_timeout ( ) ;
83708373
8371- // Server sends PTO probe (not limited to cwnd),
8372- // to update last_tx_data.
8374+ // Server sends PTO probe (not limited to cwnd), to update last_tx_data.
8375+ //
8376+ // Stream 8 (1200 bytes) is picked first because it has a lower sequence
8377+ // number than stream 4 (which was cycled many times during emit_flight).
83738378 let ( len, _) = pipe. server . send ( & mut buf) . unwrap ( ) ;
8374- assert_eq ! ( len, 848 ) ;
8379+ assert_eq ! ( len, 1200 ) ;
83758380
83768381 // Client sends STOP_SENDING to decrease tx_data
83778382 // by unsent data. It will make last_tx_data > tx_data
0 commit comments