We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5cdfeb3 commit 8085a4fCopy full SHA for 8085a4f
1 file changed
ably/realtime/channel.py
@@ -128,13 +128,14 @@ async def attach(self) -> None:
128
self.__error_reason = None
129
130
# RTL4b
131
- if self.__realtime.connection.state not in [
+ connection_state = self.__realtime.connection.state
132
+ if connection_state not in [
133
ConnectionState.CONNECTING,
134
ConnectionState.CONNECTED,
135
ConnectionState.DISCONNECTED
136
]:
137
raise AblyException(
- message=f"Unable to attach; channel state = {self.state}",
138
+ message=f"Unable to attach channel; connection state = {connection_state}",
139
code=90001,
140
status_code=400
141
)
0 commit comments