

def connectionTaskSucceeded(self, connection_task):
    'For every pending request for this connection, callback the request\n        deferred with this open connection, then remove this connection\n        from the pending map and add to the connection map.\n\n        Called when the TLS connection to the IP of relay with\n        *fingerprint* opens successfully.\n\n        :param oppy.connection.connection.Connection result: the successfully\n            opened connection\n        :param str fingerprint: fingerprint of relay we have connected to\n        '
    fprint = connection_task.micro_status_entry.fingerprint
    if (fprint not in self._pending_request_dict):
        msg = 'ConnectionManager notified that a connection to {} was made successfully, but ConnectionManager has no reference to this connection. Dropping.'.format(fprint)
        logging.debug(msg)
        return
    connection = Connection(self, connection_task)
    self._connection_dict[fprint] = connection
    connection.transport = connection_task.transport
    connection_task.transport = None
    connection.transport.wrappedProtocol = connection
    for request in self._pending_request_dict[fprint]:
        request.callback(connection)
    del self._pending_request_dict[fprint]

dataset/ETHPy150Open nskinkel/oppy/oppy/connection/connectionmanager.py ConnectionManager.connectionTaskSucceeded/original