Skip to content

Commit

Permalink
[connection] clarify connection ID change log messages
Browse files Browse the repository at this point in the history
Do not use the "migrating" term which refers to a change of network
address.
  • Loading branch information
jlaine committed Sep 13, 2019
1 parent 1fe0bc1 commit c6c677c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions aioquic/quic/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,14 @@ def change_connection_id(self) -> None:
"""
Switch to the next available connection ID and retire
the previous one.
After calling this method call :meth:`datagrams_to_send` to retrieve data
which needs to be sent.
"""
if self._peer_cid_available:
# retire previous CID
self._logger.debug(
"Retiring %s (%d)", dump_cid(self._peer_cid), self._peer_cid_seq
"Retiring CID %s (%d)", dump_cid(self._peer_cid), self._peer_cid_seq
)
self._retire_connection_ids.append(self._peer_cid_seq)

Expand All @@ -350,7 +353,7 @@ def change_connection_id(self) -> None:
self._peer_cid_seq = connection_id.sequence_number
self._peer_cid = connection_id.cid
self._logger.debug(
"Migrating to %s (%d)", dump_cid(self._peer_cid), self._peer_cid_seq
"Switching to CID %s (%d)", dump_cid(self._peer_cid), self._peer_cid_seq
)

def close(
Expand Down Expand Up @@ -804,7 +807,7 @@ def receive_datagram(self, data: bytes, addr: NetworkAddress, now: float) -> Non
and epoch == tls.Epoch.ONE_RTT
):
self._logger.debug(
"Peer migrating to %s (%d)",
"Peer switching to CID %s (%d)",
dump_cid(context.host_cid),
destination_cid_seq,
)
Expand Down Expand Up @@ -1504,7 +1507,7 @@ def _handle_retire_connection_id_frame(
reason_phrase="Cannot retire current connection ID",
)
self._logger.debug(
"Peer retiring %s (%d)",
"Peer retiring CID %s (%d)",
dump_cid(connection_id.cid),
connection_id.sequence_number,
)
Expand Down

0 comments on commit c6c677c

Please sign in to comment.