fix: prevent race condition when canceling query (#11449)

This commit is contained in:
Beto Dealmeida
2020-10-29 14:34:58 -07:00
committed by GitHub
parent f918ca14aa
commit 1d9d905497

View File

@@ -324,6 +324,10 @@ export default function sqlLabReducer(state = {}, action) {
});
},
[actions.QUERY_SUCCESS]() {
// prevent race condition were query succeeds shortly after being canceled
if (action.query.state === 'stopped') {
return state;
}
const alts = {
endDttm: now(),
progress: 100,