@@ -407,9 +407,9 @@ async fn listen_stdio(args: ListenArgs) -> Result<()> {
407407 let secret_key = get_or_create_secret ( ) ?;
408408 let endpoint = create_endpoint ( secret_key, & args. common , vec ! [ args. common. alpn( ) ?] ) . await ?;
409409 // wait for the endpoint to figure out its address before making a ticket
410- let node_addr = endpoint. node_addr ( ) ;
411- let mut short = node_addr . clone ( ) ;
412- let ticket = NodeTicket :: new ( node_addr ) ;
410+ let addr = endpoint. node_addr ( ) ;
411+ let mut short = addr . clone ( ) ;
412+ let ticket = NodeTicket :: new ( addr ) ;
413413 short. direct_addresses . clear ( ) ;
414414 let short = NodeTicket :: new ( short) ;
415415
@@ -466,10 +466,10 @@ async fn listen_stdio(args: ListenArgs) -> Result<()> {
466466async fn connect_stdio ( args : ConnectArgs ) -> Result < ( ) > {
467467 let secret_key = get_or_create_secret ( ) ?;
468468 let endpoint = create_endpoint ( secret_key, & args. common , vec ! [ ] ) . await ?;
469- let node_addr = endpoint. node_addr ( ) ;
470- let remote_node_id = node_addr . node_id ;
469+ let addr = endpoint. node_addr ( ) ;
470+ let remote_node_id = addr . node_id ;
471471 // connect to the node, try only once
472- let connection = endpoint. connect ( node_addr . clone ( ) , & args. common . alpn ( ) ?) . await ?;
472+ let connection = endpoint. connect ( addr . clone ( ) , & args. common . alpn ( ) ?) . await ?;
473473 tracing:: info!( "connected to {}" , remote_node_id) ;
474474 // open a bidi stream, try only once
475475 let ( mut s, r) = connection. open_bi ( ) . await . e ( ) ?;
@@ -540,7 +540,7 @@ async fn connect_tcp(args: ConnectTcpArgs) -> Result<()> {
540540 forward_bidi ( tcp_recv, tcp_send, endpoint_recv, endpoint_send) . await ?;
541541 Ok :: < _ , n0_snafu:: Error > ( ( ) )
542542 }
543- let node_addr = args. ticket . node_addr ( ) ;
543+ let addr = args. ticket . node_addr ( ) ;
544544 loop {
545545 // also wait for ctrl-c here so we can use it before accepting a connection
546546 let next = tokio:: select! {
@@ -551,7 +551,7 @@ async fn connect_tcp(args: ConnectTcpArgs) -> Result<()> {
551551 }
552552 } ;
553553 let endpoint = endpoint. clone ( ) ;
554- let node_addr = node_addr . clone ( ) ;
554+ let node_addr = addr . clone ( ) ;
555555 let handshake = !args. common . is_custom_alpn ( ) ;
556556 let alpn = args. common . alpn ( ) ?;
557557 tokio:: spawn ( async move {
@@ -574,9 +574,9 @@ async fn listen_tcp(args: ListenTcpArgs) -> Result<()> {
574574 } ;
575575 let secret_key = get_or_create_secret ( ) ?;
576576 let endpoint = create_endpoint ( secret_key, & args. common , vec ! [ args. common. alpn( ) ?] ) . await ?;
577- let node_addr = endpoint. node_addr ( ) ;
578- let mut short = node_addr . clone ( ) ;
579- let ticket = NodeTicket :: new ( node_addr ) ;
577+ let addr = endpoint. node_addr ( ) ;
578+ let mut short = addr . clone ( ) ;
579+ let ticket = NodeTicket :: new ( addr ) ;
580580 short. direct_addresses . clear ( ) ;
581581 let short = NodeTicket :: new ( short) ;
582582
@@ -654,9 +654,9 @@ async fn listen_unix(args: ListenUnixArgs) -> Result<()> {
654654 let socket_path = args. socket_path . clone ( ) ;
655655 let secret_key = get_or_create_secret ( ) ?;
656656 let endpoint = create_endpoint ( secret_key, & args. common , vec ! [ args. common. alpn( ) ?] ) . await ?;
657- let node_addr = endpoint. node_addr ( ) ;
658- let mut short = node_addr . clone ( ) ;
659- let ticket = NodeTicket :: new ( node_addr ) ;
657+ let addr = endpoint. node_addr ( ) ;
658+ let mut short = addr . clone ( ) ;
659+ let ticket = NodeTicket :: new ( addr ) ;
660660 short. direct_addresses . clear ( ) ;
661661 let short = NodeTicket :: new ( short) ;
662662
@@ -774,10 +774,10 @@ async fn connect_unix(args: ConnectUnixArgs) -> Result<()> {
774774 }
775775 }
776776
777- let node_addr = args. ticket . node_addr ( ) ;
778- tracing:: info!( "connecting to remote node: {:?}" , node_addr ) ;
777+ let addr = args. ticket . node_addr ( ) ;
778+ tracing:: info!( "connecting to remote node: {:?}" , addr ) ;
779779 let connection = endpoint
780- . connect ( node_addr . clone ( ) , & args. common . alpn ( ) ?)
780+ . connect ( addr . clone ( ) , & args. common . alpn ( ) ?)
781781 . await
782782 . context ( "failed to connect to remote node" ) ?;
783783 tracing:: info!( "connected to remote node successfully" ) ;
0 commit comments