Skip to content

Commit

Permalink
fix the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils authored Jan 6, 2024
1 parent 6157d97 commit 142ebe2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/aioquic/quic/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ def get_frame(
if self._pending_eof:
# FIN only
self._pending_eof = False
if self._buffer_start == self._buffer_fin:
self.is_finished = True
return QuicStreamFrame(fin=True, offset=self._buffer_fin)

self.buffer_is_empty = True
Expand Down
6 changes: 5 additions & 1 deletion tests/test_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,11 +651,15 @@ def test_sender_fin_then_ack(self):
stream.sender.on_data_delivery(QuicDeliveryState.ACKED, 0, 4)
self.assertFalse(stream.sender.is_finished)

# sending FIN transitions to finished
# send EOF
frame = stream.sender.get_frame(8)
self.assertEqual(frame.data, b"")
self.assertTrue(frame.fin)
self.assertEqual(frame.offset, 4)
self.assertFalse(stream.sender.is_finished)

# receive acknowledgement for EOF
stream.sender.on_data_delivery(QuicDeliveryState.ACKED, 4, 4)
self.assertTrue(stream.sender.is_finished)

def test_sender_fin_only_despite_blocked(self):
Expand Down

0 comments on commit 142ebe2

Please sign in to comment.