File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,10 @@ impl MockDownstream {
3030 match TcpStream :: connect ( upstream_address) . await {
3131 Ok ( stream) => break stream,
3232 Err ( _) => {
33- println ! ( "MockDownstream: unable to connect to upstream, retrying" ) ;
33+ tracing:: warn!(
34+ "MockDownstream: unable to connect to upstream, retrying after 1 second"
35+ ) ;
36+ tokio:: time:: sleep ( tokio:: time:: Duration :: from_secs ( 1 ) ) . await ;
3437 }
3538 }
3639 } )
Original file line number Diff line number Diff line change @@ -95,10 +95,12 @@ impl<'a> Sniffer<'a> {
9595 match TcpStream :: connect ( upstream_address) . await {
9696 Ok ( stream) => break stream,
9797 Err ( _) => {
98- println ! (
99- "Sniffer {}: unable to connect to upstream {}, retrying" ,
100- identifier, upstream_address
98+ tracing:: warn!(
99+ "Sniffer {}: unable to connect to upstream {}, retrying after 1 second" ,
100+ identifier,
101+ upstream_address
101102 ) ;
103+ tokio:: time:: sleep ( tokio:: time:: Duration :: from_secs ( 1 ) ) . await ;
102104 }
103105 }
104106 } )
Original file line number Diff line number Diff line change @@ -59,6 +59,10 @@ impl SnifferSV1 {
5959 match TcpStream :: connect ( upstream_address) . await {
6060 Ok ( s) => break s,
6161 Err ( _) => {
62+ tracing:: warn!(
63+ "SnifferSV1: unable to connect to upstream, retrying after 1 second"
64+ ) ;
65+ tokio:: time:: sleep ( tokio:: time:: Duration :: from_secs ( 1 ) ) . await ;
6266 continue ;
6367 }
6468 }
You can’t perform that action at this time.
0 commit comments