This commit is contained in:
Iliyan Angelov
2025-12-01 06:50:10 +02:00
parent 91f51bc6fe
commit 62c1fe5951
4682 changed files with 544807 additions and 31208 deletions

View File

@@ -283,9 +283,7 @@ class ConnectionState:
assert role is SERVER
if server_switch_event not in self.pending_switch_proposals:
raise LocalProtocolError(
"Received server {} event without a pending proposal".format(
server_switch_event
)
"Received server _SWITCH_UPGRADE event without a pending proposal"
)
_event_type = (event_type, server_switch_event)
if server_switch_event is None and _event_type is Response:
@@ -358,7 +356,7 @@ class ConnectionState:
def start_next_cycle(self) -> None:
if self.states != {CLIENT: DONE, SERVER: DONE}:
raise LocalProtocolError(
"not in a reusable state. self.states={}".format(self.states)
f"not in a reusable state. self.states={self.states}"
)
# Can't reach DONE/DONE with any of these active, but still, let's be
# sure.