Skip to content

Commit a5b064d

Browse files
FIX BUG
1 parent 936e9b3 commit a5b064d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ui/src/components/HoldToPour.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ export function HoldToPourComponent({ startPump, stopPump, interval }) {
3131
}
3232
// tick every 100ms
3333
const tid = setInterval(onTick, 100);
34-
return () => { clearInterval(tid); }
34+
return async () => {
35+
clearInterval(tid);
36+
if(isPouring) await stopPump();
37+
};
3538
}, [onTick, isPouring, stopPump, lastPouringTime]);
3639

3740
const handlePress = () => { setIsPouring(true); };

0 commit comments

Comments
 (0)