Skip to content

Commit 727adc5

Browse files
authored
fix(explorer): fix polling race condition (#102632)
Attempts to fix rare bug where the session stops polling and freezes when you send a new message
1 parent 960c20c commit 727adc5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

static/app/views/seerExplorer/hooks/useSeerExplorer.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,9 @@ const isPolling = (sessionData: SeerExplorerResponse['session'], runStarted: boo
7979
return false;
8080
}
8181

82-
if (!sessionData) {
83-
return true;
84-
}
85-
86-
// Poll if status is processing or if any message is loading
8782
return (
83+
!sessionData ||
84+
runStarted ||
8885
sessionData.status === 'processing' ||
8986
sessionData.blocks.some(message => message.loading)
9087
);

0 commit comments

Comments
 (0)