netpycos.py 文件源码

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

项目:pycos 作者: pgiri 项目源码 文件源码
def remove(location):
        _Peer._lock.acquire()
        peer = _Peer.peers.pop((location.addr, location.port), None)
        _Peer._lock.release()
        if peer:
            logger.debug('%s: peer %s terminated', peer.addrinfo.location, peer.location)
            RTI._peer_closed_(peer.location)
            peer.stream = False
            _Peer._sign_locations.pop(peer.signature, None)
            if peer.req_task:
                peer.req_task.terminate()
            if _Peer.status_task:
                _Peer.status_task.send(PeerStatus(peer.location, peer.name, PeerStatus.Offline))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号