@@ -629,7 +629,7 @@ impl Connection {
629629 builder. pad_to ( MIN_INITIAL_SIZE ) ;
630630 }
631631
632- if transmit. num_datagrams ( ) > 1 {
632+ if ! transmit. is_first_datagram ( ) {
633633 // If too many padding bytes would be required to continue the GSO batch
634634 // after this packet, end the GSO batch here. Ensures that fixed-size frames
635635 // with heterogeneous sizes (e.g. application datagrams) won't inadvertently
@@ -670,7 +670,7 @@ impl Connection {
670670 & mut transmit. datagram_mut ( ) ,
671671 ) ;
672672
673- if transmit. num_datagrams ( ) == 1 {
673+ if transmit. is_first_datagram ( ) {
674674 transmit. clip_datagram_size ( ) ;
675675 if space_id == SpaceId :: Data {
676676 // Now that we know the size of the first datagram, check
@@ -827,7 +827,7 @@ impl Connection {
827827
828828 // Send an off-path PATH_RESPONSE. Prioritized over on-path data to ensure that path
829829 // validation can occur while the link is saturated.
830- if space_id == SpaceId :: Data && transmit. num_datagrams ( ) == 1 {
830+ if space_id == SpaceId :: Data && transmit. is_first_datagram ( ) {
831831 let mut datagram = transmit. datagram_mut ( ) ;
832832 if let Some ( ( token, remote) ) = self . path_responses . pop_off_path ( self . path . remote ) {
833833 // `unwrap` guaranteed to succeed because `builder_storage` was populated just
0 commit comments