| Index: net/quic/core/quic_connection.cc
|
| diff --git a/net/quic/core/quic_connection.cc b/net/quic/core/quic_connection.cc
|
| index 93232b5802d302d4cafdfd764b4f6790a3dd1147..e4fbc708ae0c1b0080d9f67cba621d698ef22037 100644
|
| --- a/net/quic/core/quic_connection.cc
|
| +++ b/net/quic/core/quic_connection.cc
|
| @@ -1058,9 +1058,9 @@ QuicConsumedData QuicConnection::SendStreamData(
|
| QuicStreamId id,
|
| QuicIOVector iov,
|
| QuicStreamOffset offset,
|
| - bool fin,
|
| + StreamSendingState state,
|
| QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener) {
|
| - if (!fin && iov.total_length == 0) {
|
| + if (state == NO_FIN && iov.total_length == 0) {
|
| QUIC_BUG << "Attempt to send empty stream frame";
|
| return QuicConsumedData(0, false);
|
| }
|
| @@ -1075,12 +1075,12 @@ QuicConsumedData QuicConnection::SendStreamData(
|
| // The optimized path may be used for data only packets which fit into a
|
| // standard buffer and don't need padding.
|
| if (id != kCryptoStreamId && !packet_generator_.HasQueuedFrames() &&
|
| - iov.total_length > kMaxPacketSize) {
|
| + iov.total_length > kMaxPacketSize && state != FIN_AND_PADDING) {
|
| // Use the fast path to send full data packets.
|
| - return packet_generator_.ConsumeDataFastPath(id, iov, offset, fin,
|
| - std::move(ack_listener));
|
| + return packet_generator_.ConsumeDataFastPath(
|
| + id, iov, offset, state != NO_FIN, std::move(ack_listener));
|
| }
|
| - return packet_generator_.ConsumeData(id, iov, offset, fin ? FIN : NO_FIN,
|
| + return packet_generator_.ConsumeData(id, iov, offset, state,
|
| std::move(ack_listener));
|
| }
|
|
|
|
|