feat(connector.py): handle CONTROL.CLOSE msgs

This commit is contained in:
2026-02-28 20:44:52 +01:00
parent 448ffa443d
commit 64866079d7

View File

@@ -174,8 +174,17 @@ class Connector:
)
try:
message: Message = Message.from_bytes(message_bytes)
# handle incoming ACKs
if (
message.category == Category.CONTROL
and message.action == ControlAction.CLOSE
):
self.logger.warning(
"[!] Received CLOSE command from server, shutting down."
)
self.running = False
break
# handle incoming ACKs
elif (
message.category == Category.CONTROL
and message.action == ControlAction.ACK
):