def stopService(self):
def stop_cb():
if self._connector is not None:
self._connector.disconnect()
del self._connector
service.Service.stopService(self)
l = []
for svc in reversed(list(self)):
l.append(defer.maybeDeferred(svc.stopService))
if l:
l = defer.DeferredList(l)
l.addCallback(stop_cb)
else:
stop_cb()
return l
评论列表
文章目录