'Make sure stopFactory is called.
Users should not call this function themselves!'

def doStop(self):

    if (self.numPorts == 0):
        return
    self.numPorts = (self.numPorts - 1)
    if (not self.numPorts):
        if self.noisy:
            _loggerFor(self).info('Stopping    factory    {factory!r}', factory=self)
        self.stopFactory()
