def connectionMade(self):
@defer.inlineCallbacks
def killIfAlive():
"""Terminate after timeout if still alive
"""
try:
yield self.transport.signalProcess('KILL')
log.msg('Killed source proccess: Timeout %s exceeded'
% self.timeout)
except error.ProcessExitedAlready:
pass
self.timer = reactor.callLater(self.timeout, killIfAlive)
评论列表
文章目录