def connectionLost(self, reason):
     try:
         self.timeoutschedule.cancel()
     except:
         pass
     self.current_running_plugin = None
     self.dbConnection = None
     self.speech = None
     self.httpClient = None
     Siri.connectionLost(self, reason)
 def __init__(self, server, peer):
     Siri.__init__(self, server, peer)
     self.lastPing = 0
     self.pong = 0
     self.plugin_lastAceId = ""
     self.current_running_plugin = None
     self.dbConnection = server.dbConnection
     self.assistant = None
     self.speech = dict()
     self.httpClient = AsyncOpenHttp(self.handle_google_data)
     self.current_google_request = None
     self.current_location = None
 def __init__(self, server, peer):
     Siri.__init__(self, server, peer)
     self.lastPing = 0
     self.pong = 0
     self.plugin_lastAceId = ""
     self.current_running_plugin = None
     self.dbConnection = server.dbConnection
     self.assistant = None
     self.speech = dict()
     self.httpClient = AsyncOpenHttp(self.handle_google_data)
     self.current_google_request = None
     self.current_location = None
     self.lastPingTime = time.time()
     self.timeoutschedule = twisted.internet.reactor.callLater(SiriProtocolHandler.__scheduling_interval_timeout__, self.checkTimeout)
示例#4
0
 def __init__(self, server, peer):
     Siri.__init__(self, server, peer)
     self.lastPing = 0
     self.pong = 0
     self.plugin_lastAceId = ""
     self.current_running_plugin = None
     self.dbConnection = server.dbConnection
     self.assistant = None
     self.speech = dict()
     self.httpClient = AsyncOpenHttp(self.handle_google_data)
     self.current_google_request = None
     self.current_location = None
     self.lastPingTime = time.time()
     self.timeoutschedule = twisted.internet.reactor.callLater(SiriProtocolHandler.__scheduling_interval_timeout__, self.checkTimeout)
 def connectionLost(self, reason):
     try:
         self.timeoutschedule.cancel()
     except:
         pass
     if self.current_google_request != None:
             self.current_google_request.cancel()
     #ensure all decoder/encoder attemps are closed
     for key in self.speech.keys():
         (decoder, encoder, _) = self.speech[key]
         if decoder:
             decoder.destroy()
         if encoder:
             encoder.finish()
             encoder.destroy()
     del self.speech
     self.current_running_plugin = None
     self.dbConnection = None
     self.httpClient = None
     Siri.connectionLost(self, reason)
 def connectionLost(self, reason):
     try:
         self.timeoutschedule.cancel()
     except:
         pass
     if self.current_google_request != None:
         self.current_google_request.cancel()
     #ensure all decoder/encoder attemps are closed
     for key in self.speech.keys():
         (decoder, encoder, _) = self.speech[key]
         if decoder:
             decoder.destroy()
         if encoder:
             encoder.finish()
             encoder.destroy()
     del self.speech
     self.current_running_plugin = None
     self.dbConnection = None
     self.httpClient = None
     Siri.connectionLost(self, reason)