Skip to content

Commit

Permalink
chore(1-3217): run in a neverending loop
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheartman committed Dec 20, 2024
1 parent 2171000 commit e70e735
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions server/src/http/feature_refresher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,16 @@ impl FeatureRefresher {
})
.map_err(|e| warn!("Error in SSE stream: {:?}", e));

while let Ok(Some(handler)) = stream.try_next().await {
handler.await;
loop {
match stream.try_next().await {
Ok(Some(handler)) => handler.await,
Ok(None) => {
info!("SSE stream ended? Handler was None, anyway. Reconnecting.");
}
Err(e) => {
info!("SSE stream error: {e:?}. Reconnecting");
}
}
}
});
}
Expand Down

0 comments on commit e70e735

Please sign in to comment.