fix : analyze game stuck on 1% progress
This commit is contained in:
@@ -165,7 +165,7 @@ export const useCurrentPosition = (engine: UciEngine | null) => {
|
||||
|
||||
return () => {
|
||||
if (engine?.getIsReady()) {
|
||||
engine?.stopSearch();
|
||||
engine?.stopAllCurrentJobs();
|
||||
}
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
||||
@@ -101,6 +101,10 @@ export default function AnalyzeButton() {
|
||||
black.rating,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
setEvaluationProgress(0);
|
||||
}, [engine, setEvaluationProgress]);
|
||||
|
||||
// Automatically analyze when a new game is loaded and ready to analyze
|
||||
useEffect(() => {
|
||||
if (!gameEval && readyToAnalyse) {
|
||||
|
||||
Reference in New Issue
Block a user