'Stop the service.
@rtype: L{Deferred<defer.Deferred>}
@return: a L{Deferred<defer.Deferred>} which is fired when the
currently running call (if any) is finished.'

def stopService(self):

    if self._loop.running:
        self._loop.stop()
    self._loopFinished.addCallback((lambda _: service.Service.stopService(self)))
    return self._loopFinished
