p2pprotocol.py 文件源码

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

项目:QRL 作者: theQRL 项目源码 文件源码
def connectionLost(self, reason=connectionDone):
        logger.info('%s disconnected. remainder connected: %s',
                    self.transport.getPeer().host,
                    str(self.factory.connections))  # , reason
        try:
            self.factory.peer_connections.remove(self)

            if self.factory.connections == 0:
                reactor.callLater(60, self.factory.connect_peers)

            # FIXME: unsafe access to synced_peers
            if self in self.factory.synced_peers:
                self.factory.synced_peers.remove(self)
        except Exception:
            pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号