Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure signer doesn't exit on connection change #524

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions libs/gl-client/src/signer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ impl Signer {
msg: e.to_string(),
request: Some(req.clone()),
git_version: GITHASH.to_string(),
node_id: self.node_id(),
node_id: self.node_id(),
})
.await;
#[cfg(not(feature = "permissive"))]
Expand Down Expand Up @@ -569,7 +569,7 @@ impl Signer {
msg: format!("{:?}", e),
request: Some(req.clone()),
git_version: GITHASH.to_string(),
node_id: self.node_id(),
node_id: self.node_id(),
})
.await;
return Err(Error::Other(anyhow!("processing request: {e:?}")));
Expand Down Expand Up @@ -816,6 +816,17 @@ impl Signer {
}

async fn run_forever_scheduler(
&self,
scheduler: SchedulerClient<tonic::transport::Channel>,
) -> Result<(), anyhow::Error> {
loop {
if let Err(e) = self.run_once_scheduler(scheduler.clone()).await {
warn!("Error running schduler, trying again: {e}");
}
}
}

async fn run_once_scheduler(
&self,
mut scheduler: SchedulerClient<tonic::transport::Channel>,
) -> Result<(), anyhow::Error> {
Expand Down
Loading