Skip to content

Commit

Permalink
added more extensive test that should cover everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Aperence committed Dec 13, 2023
1 parent 710de49 commit b99d2e4
Show file tree
Hide file tree
Showing 2 changed files with 406 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/aioquic/quic/congestion/cubic.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def on_packet_acked(self, *, now: float, packet: QuicSentPacket) -> None:

def on_packet_sent(self, *, packet: QuicSentPacket) -> None:
self.bytes_in_flight += packet.sent_bytes
if self.last_ack != 0.0:
if self.last_ack == 0.0:
return
elapsed_idle = packet.sent_time - self.last_ack
if elapsed_idle >= K_CUBIC_MAX_IDLE_TIME:
Expand Down Expand Up @@ -204,10 +204,7 @@ def on_rtt_measurement(self, *, now: float, rtt: float) -> None:
def get_log_data(self) -> Dict[str, Any]:
data = super().get_log_data()

if self._W_max is None:
data["cubic-wmax"] = None
else:
data["cubic-wmax"] = int(self._W_max)
data["cubic-wmax"] = int(self._W_max)

return data

Expand Down
Loading

0 comments on commit b99d2e4

Please sign in to comment.