Skip to content

Commit

Permalink
fix setting state in _schedule_reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia committed Feb 5, 2024
1 parent 5650278 commit 647903b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion centrifuge/__meta__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.0b3"
__version__ = "0.3.0b4"
8 changes: 4 additions & 4 deletions centrifuge/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ async def _schedule_reconnect(self) -> None:
logger.debug("won't reconnect")
return

self.status = ClientState.CONNECTING
self.state = ClientState.CONNECTING

delay = _backoff(
self._reconnect_attempts,
Expand Down Expand Up @@ -515,7 +515,7 @@ async def _clear_connected_state(self) -> None:
for sub in self._subs.values():
if sub.state == SubscriptionState.SUBSCRIBED:
unsubscribe_code = _SubscribingCode.TRANSPORT_CLOSED
await sub.move_subscribing(
await sub._move_subscribing(
code=_code_number(unsubscribe_code),
reason=_code_message(unsubscribe_code),
skip_schedule_resubscribe=True,
Expand Down Expand Up @@ -1172,7 +1172,7 @@ async def _process_unsubscribe(self, channel: str, unsubscribe: Dict[str, Any])
if code < 2500:
asyncio.ensure_future(sub._move_unsubscribed(code, unsubscribe["reason"]))
else:
asyncio.ensure_future(sub.move_subscribing(code, unsubscribe["reason"]))
asyncio.ensure_future(sub._move_subscribing(code, unsubscribe["reason"]))
else:
server_sub = self._server_subs.get(channel)
if server_sub:
Expand Down Expand Up @@ -1501,7 +1501,7 @@ async def _consume_subscribed_future(self) -> None:
with contextlib.suppress(CentrifugeError):
await self._subscribed_future

async def move_subscribing(
async def _move_subscribing(
self,
code: int,
reason: str,
Expand Down

0 comments on commit 647903b

Please sign in to comment.