File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -59,13 +59,15 @@ pub(crate) async fn run_async(config: &GuestAgentConfig) -> anyhow::Result<JoinS
5959
6060 set. spawn ( publisher. run ( rx) ) ;
6161
62- // Remove old entries from previous agent to avoid having unknown
63- // interfaces. We will repopulate existing ones immediatly.
64- tx. send ( GuestMetric :: CleanupIfaces ) . await ?;
62+ if config. report_nics {
63+ // Remove old entries from previous agent to avoid having unknown
64+ // interfaces. We will repopulate existing ones immediatly.
65+ tx. send ( GuestMetric :: CleanupIfaces ) . await ?;
66+ set. spawn ( NetworkPlugin :: new ( config. network ) ?. run ( tx. clone ( ) ) ) ;
67+ }
6568
6669 set. spawn ( provider_os:: OsInfoPlugin . run ( tx. clone ( ) ) ) ;
6770 set. spawn ( provider_memory:: MemoryPlugin . run ( tx. clone ( ) ) ) ;
68- set. spawn ( NetworkPlugin :: new ( config. network ) ?. run ( tx. clone ( ) ) ) ;
6971
7072 Ok ( set)
7173}
You can’t perform that action at this time.
0 commit comments