RPC: rename new_session to new_connection
This commit is contained in:
parent
de423f6a36
commit
bd134525fd
|
@ -75,7 +75,7 @@ impl RpcMgr {
|
|||
/// TODO RPC: If `client` is not a `TorClient<PreferredRuntime>`, it won't
|
||||
/// be possible to invoke any of its methods. See #837.
|
||||
#[allow(clippy::missing_panics_doc)]
|
||||
pub fn new_session<R: Runtime>(self: &Arc<Self>, client: TorClient<R>) -> Arc<Connection> {
|
||||
pub fn new_connection<R: Runtime>(self: &Arc<Self>, client: TorClient<R>) -> Arc<Connection> {
|
||||
let connection_id = ConnectionId::from(rand::thread_rng().gen::<[u8; 16]>());
|
||||
let client_obj = Arc::new(client);
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ async fn run_rpc_listener<R: Runtime>(
|
|||
loop {
|
||||
let (stream, _addr) = listener.accept().await?;
|
||||
// TODO RPC: Perhaps we should have rpcmgr hold the client reference?
|
||||
let session = rpc_mgr.new_session(client.isolated_client());
|
||||
let session = rpc_mgr.new_connection(client.isolated_client());
|
||||
let (input, output) = stream.into_split();
|
||||
|
||||
#[cfg(feature = "tokio")]
|
||||
|
|
Loading…
Reference in New Issue