code: def close(self):
          
          if not self.is_running:
              return
  
          self._state = CLOSED
          self.logger.debug('closing connection(s)')
  
          while True:
              try:
                  conn = self._connections.get(block=False)
              except Empty:
                  break
  
              conn.close_stream()
  
          self.on_close.send(self)
docs: Immediately close all connections and stop workers.