mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 12:08:40 +02:00
Fix attr err
This commit is contained in:
parent
ffb7276a8a
commit
4a0e8aa780
1 changed files with 4 additions and 1 deletions
|
@ -82,7 +82,10 @@ class Socket:
|
|||
response = self.client.send(self.login)
|
||||
except (LoginError, OSError) as err:
|
||||
logger.error(err)
|
||||
if err.should_retry() and counter < 10:
|
||||
should_retry = True
|
||||
if isinstance(err, LoginError):
|
||||
should_retry = err.should_retry()
|
||||
if should_retry and counter < 10:
|
||||
counter += 1
|
||||
sleep((counter * 50) / 1000) # sleep 50 ms to 150 ms
|
||||
else: # don't try again
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue