File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,6 +99,8 @@ pub async fn run_rpc_server<A: Accept>(
9999
100100 // Create a stream of connections from the acceptor
101101 let incoming = plain_incoming_stream ( acceptor) ;
102+
103+ tracing:: info!( "Starting gRPC server with incoming stream" ) ;
102104
103105 // Serve with tonic's native server
104106 router. serve_with_incoming ( incoming) . await ?;
@@ -145,14 +147,21 @@ where
145147 A : Accept ,
146148{
147149 try_stream ! {
150+ tracing:: info!( "Starting plain incoming stream" ) ;
148151 loop {
149152 let conn = match poll_fn( |cx| Pin :: new( & mut acceptor) . poll_accept( cx) ) . await {
150- Some ( Ok ( conn) ) => conn,
153+ Some ( Ok ( conn) ) => {
154+ tracing:: debug!( "Accepted new connection" ) ;
155+ conn
156+ }
151157 Some ( Err ( e) ) => {
152158 tracing:: error!( "Accept error: {}" , e) ;
153159 continue ;
154160 }
155- None => break ,
161+ None => {
162+ tracing:: info!( "Acceptor closed, stopping stream" ) ;
163+ break ;
164+ }
156165 } ;
157166
158167 yield conn;
You can’t perform that action at this time.
0 commit comments