daemon_manager.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:sc-controller 作者: kozec 项目源码 文件源码
def _on_daemon_died(self, *a):
        """ Called from various places when daemon looks like dead """
        # Log stuff
        if self.alive is True:
            log.debug("Connection to daemon lost")
        if self.alive is True or self.alive is None:
            self.alive = False
            self.emit("dead")
        self.alive = False
        # Close connection, if any
        if self.connection is not None:
            self.connection.close()
            self.connection = None
        # Emit event
        # Try to reconnect
        GLib.timeout_add_seconds(self.RECONNECT_INTERVAL, self._connect)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号