diff --git a/src/epplibwrapper/socket.py b/src/epplibwrapper/socket.py index 6040f6682..f79e60917 100644 --- a/src/epplibwrapper/socket.py +++ b/src/epplibwrapper/socket.py @@ -78,7 +78,7 @@ class Socket: self.client.connect() response = self.client.send(self.login) except LoginError as err: - if err.should_retry() and counter < 3: + if err.should_retry() and counter < 10: counter += 1 sleep((counter * 50) / 1000) # sleep 50 ms to 150 ms else: # don't try again diff --git a/src/epplibwrapper/utility/pool.py b/src/epplibwrapper/utility/pool.py index e28270f50..a5a5adaaa 100644 --- a/src/epplibwrapper/utility/pool.py +++ b/src/epplibwrapper/utility/pool.py @@ -97,7 +97,7 @@ class EPPConnectionPool(ConnectionPool): def kill_all_connections(self): """Kills all active connections in the pool.""" try: - if len(self.conn) > 0: + if len(self.conn) > 0 or len(self.greenlets) > 0: gevent.killall(self.greenlets) self.greenlets.clear() @@ -116,7 +116,7 @@ class EPPConnectionPool(ConnectionPool): If any connections exist, kill them first. Based off of the __init__ definition for geventconnpool. """ - if len(self.conn) > 0: + if len(self.conn) > 0 or len(self.greenlets) > 0: self.kill_all_connections() # Setup the lock diff --git a/src/registrar/management/commands/transfer_transition_domains_to_domains.py b/src/registrar/management/commands/transfer_transition_domains_to_domains.py index 8db2e5ed9..d0d6ff363 100644 --- a/src/registrar/management/commands/transfer_transition_domains_to_domains.py +++ b/src/registrar/management/commands/transfer_transition_domains_to_domains.py @@ -365,14 +365,14 @@ class Command(BaseCommand): contact.save() else: logger.warning(f"Duplicate contact found {contact}. Updating all relevant entries.") - for c in contact: + for c in contacts: c.first_name = first_name c.middle_name = middle_name c.last_name = last_name c.email = email c.phone = phone c.save() - contact = c.first() + contact = contacts.first() return contact def create_new_domain_info(