From 47c5f45c765ae207f58ba2675f91eaf8c79f8500 Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Tue, 26 Oct 2021 23:52:21 +0100 Subject: [PATCH] Document how to get connection state in the client (Fixes #799) --- docs/api.rst | 4 ++-- src/socketio/client.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index b23de1a..0c685e6 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -35,7 +35,7 @@ API Reference ``ConnectionRefusedError`` class -------------------------------- -.. autoclass:: ConnectionRefusedError +.. autoclass:: socketio.exceptions.ConnectionRefusedError :members: ``WSGIApp`` class @@ -128,7 +128,7 @@ API Reference :members: ``AsyncAioPikaManager`` class ---------------------------- +----------------------------- .. autoclass:: AsyncAioPikaManager :members: diff --git a/src/socketio/client.py b/src/socketio/client.py index 0d0b385..2078e5d 100644 --- a/src/socketio/client.py +++ b/src/socketio/client.py @@ -148,8 +148,8 @@ class Client(object): self.socketio_path = None self.sid = None - self.connected = False - self.namespaces = {} + self.connected = False #: Indicates if the client is connected or not. + self.namespaces = {} #: set of connected namespaces. self.handlers = {} self.namespace_handlers = {} self.callbacks = {}