diff --git a/scripty_stt/src/load_balancer.rs b/scripty_stt/src/load_balancer.rs index 2ab10085..d7c599d5 100644 --- a/scripty_stt/src/load_balancer.rs +++ b/scripty_stt/src/load_balancer.rs @@ -130,7 +130,9 @@ impl LoadBalancedStream { ))); } - Stream::new(language, verbose, self.peer_address).await + let res = Stream::new(language, verbose, self.peer_address).await; + self.is_in_error.store(res.is_err(), Ordering::Relaxed); + res } pub async fn new(peer_address: SocketAddr) -> io::Result {