diff --git a/node/src/protocol/mod.rs b/node/src/protocol/mod.rs index 0122418f1..775974d48 100644 --- a/node/src/protocol/mod.rs +++ b/node/src/protocol/mod.rs @@ -189,13 +189,28 @@ impl MpcSignProtocol { } } - let mut state = { - let guard = self.state.write().await; + let state = { + let guard = self.state.read().await; guard.clone() }; - state = state.progress(&self.ctx).await?; - state = state.advance(&self.ctx, contract_state).await?; - state.handle(&self.ctx, &mut queue).await?; + let state = match state.progress(&self.ctx).await { + Ok(state) => state, + Err(err) => { + tracing::info!("protocol unable to progress: {err:?}"); + continue; + } + }; + let mut state = match state.advance(&self.ctx, contract_state).await { + Ok(state) => state, + Err(err) => { + tracing::info!("protocol unable to advance: {err:?}"); + continue; + } + }; + if let Err(err) = state.handle(&self.ctx, &mut queue).await { + tracing::info!("protocol unable to handle messages: {err:?}"); + continue; + } let mut guard = self.state.write().await; *guard = state;