diff --git a/chess_uci/src/lib.rs b/chess_uci/src/lib.rs index 26a4ce7..22798fc 100644 --- a/chess_uci/src/lib.rs +++ b/chess_uci/src/lib.rs @@ -1,7 +1,7 @@ #![allow(dead_code)] /// Manage UCI messages and link into chess component -mod uci_command; +pub mod uci_command; use log::{info, warn}; use std::io::*; @@ -63,8 +63,10 @@ impl UciEngine { self.push(GuiCommand::Uci); // Consume commands until uciok messages - while !self.uciok { - self.pull(); + if self.source.is_some() { + while !self.uciok { + self.pull(); + } } }