return # not started yet
_moduleLogger.info("%s Forcing immediate update of state machine" % (self._name, ))
self._onTimeout.cancel()
- self._strategy.initialize_state()
+ self._strategy.reinitialize_state()
self._strategy.increment_state()
nextTimeout = self._strategy.timeout
if nextTimeout != self.INFINITE_PERIOD and nextTimeout < self._maxTime:
channel[telepathy.server.CHANNEL_TYPE_TEXT].Send(
telepathy.CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
message,
- reply_handler = lambda: _on_send(acct, conn, channel),
+ reply_handler = lambda: _on_send(channel),
error_handler = _on_error,
)
-def _on_send(acct, conn, channel):
+def _on_send(channel):
print "Message sent"
+ channel[telepathy.server.CHANNEL].Close(
+ reply_handler = _on_channel_closed,
+ error_handler = _on_error,
+ )
+
+
+def _on_channel_closed():
+ print "Channel Closed"
loop.quit()