From aa33161cd9498bfca39d64fc36319bc1fbce68f2 Mon Sep 17 00:00:00 2001 From: MtkN1 <51289448+MtkN1@users.noreply.github.com> Date: Wed, 7 Feb 2024 13:14:22 +0900 Subject: [PATCH] Fix wrong RFC number --- src/websockets/legacy/client.py | 2 +- tests/test_protocol.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/websockets/legacy/client.py b/src/websockets/legacy/client.py index b85d2286..25569658 100644 --- a/src/websockets/legacy/client.py +++ b/src/websockets/legacy/client.py @@ -599,7 +599,7 @@ async def __aiter__(self) -> AsyncIterator[WebSocketClientProtocol]: yield protocol except Exception: # Add a random initial delay between 0 and 5 seconds. - # See 7.2.3. Recovering from Abnormal Closure in RFC 6544. + # See 7.2.3. Recovering from Abnormal Closure in RFC 6455. if backoff_delay == self.BACKOFF_MIN: initial_delay = random.random() * self.BACKOFF_INITIAL self.logger.info( diff --git a/tests/test_protocol.py b/tests/test_protocol.py index 1d5dab7a..e1527525 100644 --- a/tests/test_protocol.py +++ b/tests/test_protocol.py @@ -714,7 +714,7 @@ class CloseTests(ProtocolTestCase): """ Test close frames. - See RFC 6544: + See RFC 6455: 5.5.1. Close 7.1.6. The WebSocket Connection Close Reason @@ -994,7 +994,7 @@ def test_server_sends_close_after_connection_is_closed(self): class PingTests(ProtocolTestCase): """ - Test ping. See 5.5.2. Ping in RFC 6544. + Test ping. See 5.5.2. Ping in RFC 6455. """ @@ -1153,7 +1153,7 @@ def test_server_sends_ping_after_connection_is_closed(self): class PongTests(ProtocolTestCase): """ - Test pong frames. See 5.5.3. Pong in RFC 6544. + Test pong frames. See 5.5.3. Pong in RFC 6455. """ @@ -1298,7 +1298,7 @@ class FailTests(ProtocolTestCase): """ Test failing the connection. - See 7.1.7. Fail the WebSocket Connection in RFC 6544. + See 7.1.7. Fail the WebSocket Connection in RFC 6455. """ @@ -1321,7 +1321,7 @@ class FragmentationTests(ProtocolTestCase): """ Test message fragmentation. - See 5.4. Fragmentation in RFC 6544. + See 5.4. Fragmentation in RFC 6455. """