Skip to content

Commit c0e3000

Browse files
committed
Rename internal reconnect kwarg to "reset"
1 parent fbf220d commit c0e3000

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • library/wumpy-gateway/wumpy/gateway

library/wumpy-gateway/wumpy/gateway/shard.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ async def __aenter__(self) -> Self:
165165
self._ratelimiter_manager
166166
)
167167

168-
await self._reconnect(startup=True)
168+
await self._reconnect(reset=False)
169169

170170
tg = await self._exit_stack.enter_async_context(anyio.create_task_group())
171171
tg.start_soon(self._run_heartbeater)
@@ -362,7 +362,7 @@ async def _receive_hello(self) -> Optional[Dict[str, Any]]:
362362

363363
return event
364364

365-
async def _reconnect(self, *, startup: bool = False) -> None:
365+
async def _reconnect(self, *, reset: bool = True) -> None:
366366
if self.ratelimiter is None:
367367
raise RuntimeError('Cannot (re)connect without a initialized ratelimiter')
368368

@@ -375,7 +375,7 @@ async def _reconnect(self, *, startup: bool = False) -> None:
375375
except _DISCONNECT_ERRS:
376376
pass
377377

378-
if startup:
378+
if reset:
379379
# Reset the internal state of the connection to prepare for a new
380380
# WebSocket connection. This will exponentially backoff until it
381381
# receives a READY event.
@@ -386,7 +386,7 @@ async def _reconnect(self, *, startup: bool = False) -> None:
386386
# In case this code loops, we are actually reconnecting and not
387387
# just connecting for the first time. The second iteration we
388388
# '*want* to back off.
389-
startup = False
389+
reset = True
390390

391391
try:
392392
self._sock = await anyio.connect_tcp(

0 commit comments

Comments
 (0)