code: def stopFactory(self):
          
          if self.client:
              yield self.client.stopProducing()
          protocol.ReconnectingClientFactory.stopFactory(self)
docs: Stop the factory.
  
          See the documentation of
          `twisted.internet.protocol.ReconnectingClientFactory` for details.