pysyncobj/transport.py
def dropNode(self, node):
        """
        Drop a node from the network

        :param node: node to drop
        :type node: Node
        """

        conn = self._connections.pop(node, None)
        if conn is not None:
            # Calling conn.disconnect() immediately triggers the onDisconnected callback if the connection isn't already disconnected, so this is necessary to prevent the automatic reconnect.
            self._preventConnectNodes.add(node)
            conn.disconnect()
            self._preventConnectNodes.remove(node)
        if isinstance(node, TCPNode):
            self._nodes.discard(node)
            self._nodeAddrToNode.pop(node.address, None)
        else:
            self._readonlyNodes.discard(node)
        self._lastConnectAttempt.pop(node, None)
def dropNode(self, node):
        conn = self._connections.pop(node, None)
        if conn is not None:
            # Calling conn.disconnect() immediately triggers the onDisconnected callback if the connection isn't already disconnected, so this is necessary to prevent the automatic reconnect.
            self._preventConnectNodes.add(node)
            conn.disconnect()
            self._preventConnectNodes.remove(node)
        if isinstance(node, TCPNode):
            self._nodes.discard(node)
            self._nodeAddrToNode.pop(node.address, None)
        else:
            self._readonlyNodes.discard(node)
        self._lastConnectAttempt.pop(node, None)
def dropNode ( self , node ) : conn = self . _connections . pop ( node , None ) if conn is not None : # Calling conn.disconnect() immediately triggers the onDisconnected callback if the connection isn't already disconnected, so this is necessary to prevent the automatic reconnect. self . _preventConnectNodes . add ( node ) conn . disconnect ( ) self . _preventConnectNodes . remove ( node ) if isinstance ( node , TCPNode ) : self . _nodes . discard ( node ) self . _nodeAddrToNode . pop ( node . address , None ) else : self . _readonlyNodes . discard ( node ) self . _lastConnectAttempt . pop ( node , None )
Drop a node from the network

        :param node: node to drop
        :type node: Node
Drop a node from the network