File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -76,9 +76,6 @@ async fn poll_comm_links(db: Database) -> Result<()> {
7676 . await ?;
7777 loop {
7878 let cfgs = CommLinkCfg :: lookup_all ( db. clone ( ) ) . await ?;
79- if cfgs. is_empty ( ) {
80- break ;
81- }
8279 tasks. retain ( |name, task| {
8380 match cfgs. iter ( ) . find ( |cfg| cfg. name ( ) == name) {
8481 Some ( cfg) => {
@@ -112,6 +109,7 @@ async fn poll_comm_links(db: Database) -> Result<()> {
112109 tasks. insert ( name, task) ;
113110 }
114111 }
112+ // wait for any configuration change
115113 while let Some ( not) = receiver. recv ( ) . await {
116114 if should_reload ( & not, & cfgs) {
117115 log:: info!(
@@ -128,7 +126,6 @@ async fn poll_comm_links(db: Database) -> Result<()> {
128126 }
129127 }
130128 }
131- Ok ( ( ) )
132129}
133130
134131/// Check if a notification should trigger reloading the configuration
You can’t perform that action at this time.
0 commit comments