original_docstring: When a connection fails, it is added to the blacklist and a new one is tried. It is never added back to the pool
          for this particular connection unless all hosts have been added to the blacklist. In the future we may want to add
          a mechanism to reattempt connection after a delay
docstring: When a connection fails, it is added to the blacklist and a new one is tried. It is never added back to the pool
  for this particular connection unless all hosts have been added to the blacklist. In the future we may want to add
  a mechanism to reattempt connection after a delay
docstring_tokens: When a connection fails it is added to the blacklist and a new one is tried . It is never added back to the pool for this particular connection unless all hosts have been added to the blacklist . In the future we may want to add a mechanism to reattempt connection after a delay
code: def connection_failed(self):
          """When a connection fails, it is added to the blacklist and a new one is tried. It is never added back to the pool
          for this particular connection unless all hosts have been added to the blacklist. In the future we may want to add
          a mechanism to reattempt connection after a delay"""
  
          self.port_blacklist.add(self.current_port)
          self.host_blacklist.add(self.current_host)
  
          if len(self.host_blacklist) >= len(self.host):
              self.host_blacklist = set()
          if len(self.port_blacklist) >= len(self.port):
              self.port_blacklist = set()
code_tokens: def connection_failed ( self ) : self . port_blacklist . add ( self . current_port ) self . host_blacklist . add ( self . current_host ) if len ( self . host_blacklist ) >= len ( self . host ) : self . host_blacklist = set ( ) if len ( self . port_blacklist ) >= len ( self . port ) : self . port_blacklist = set ( )
short_docstring: When a connection fails, it is added to the blacklist and a new one is tried.
short_docstring_tokens: When a connection fails it is added to the blacklist and a new one is tried .
comment: """When a connection fails, it is added to the blacklist and a new one is tried. It is never added back to the pool
          for this particular connection unless all hosts have been added to the blacklist. In the future we may want to add
          a mechanism to reattempt connection after a delay"""