@@ -330,10 +330,11 @@ async fn listen_stdio(args: ListenArgs) -> Result<()> {
330330 r. read_exact ( & mut buf) . await . e ( ) ?;
331331 snafu:: ensure_whatever!( buf == dumbpipe:: HANDSHAKE , "invalid handshake" ) ;
332332 }
333- tracing:: info!( "forwarding stdin/stdout to {}" , remote_node_id) ;
334333 if args. recv_only {
334+ tracing:: info!( "forwarding stdout to {} (ignoring stdin)" , remote_node_id) ;
335335 forward_bidi ( tokio:: io:: empty ( ) , tokio:: io:: stdout ( ) , r, s) . await ?;
336336 } else {
337+ tracing:: info!( "forwarding stdin/stdout to {}" , remote_node_id) ;
337338 forward_bidi ( tokio:: io:: stdin ( ) , tokio:: io:: stdout ( ) , r, s) . await ?;
338339 }
339340 // stop accepting connections after the first successful one
@@ -368,10 +369,11 @@ async fn connect_stdio(args: ConnectArgs) -> Result<()> {
368369 // on stdin, so just write a handshake.
369370 s. write_all ( & dumbpipe:: HANDSHAKE ) . await . e ( ) ?;
370371 }
371- tracing:: info!( "forwarding stdin/stdout to {}" , remote_node_id) ;
372372 if args. recv_only {
373+ tracing:: info!( "forwarding stdout to {} (ignoring stdin)" , remote_node_id) ;
373374 forward_bidi ( tokio:: io:: empty ( ) , tokio:: io:: stdout ( ) , r, s) . await ?;
374375 } else {
376+ tracing:: info!( "forwarding stdin/stdout to {}" , remote_node_id) ;
375377 forward_bidi ( tokio:: io:: stdin ( ) , tokio:: io:: stdout ( ) , r, s) . await ?;
376378 }
377379 tokio:: io:: stdout ( ) . flush ( ) . await . e ( ) ?;
0 commit comments