mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-25 16:19:20 -04:00
fix: repeat on interval may lead to stay requesting (#6936)
This commit is contained in:
1 parent
e38badfbf3
commit
c12c4ff05f
1 file changed
+2
-1
@@ -190,7 +190,7 @@ export const RequestUrlBar = forwardRef<RequestUrlBarHandle, Props>(({
|
||||
};
|
||||
}, [sendOrConnect]);
|
||||
|
||||
useInterval(sendOrConnect, currentInterval ? currentInterval : null);
|
||||
useInterval(sendOrConnect, currentInterval && fetcher.state === 'idle' ? currentInterval : null);
|
||||
useTimeoutWhen(sendOrConnect, currentTimeout, !!currentTimeout);
|
||||
const patchRequest = useRequestPatcher();
|
||||
|
||||
@@ -327,6 +327,7 @@ export const RequestUrlBar = forwardRef<RequestUrlBarHandle, Props>(({
|
||||
defaultValue: '3',
|
||||
submitName: 'Start',
|
||||
onComplete: seconds => {
|
||||
sendOrConnect();
|
||||
setCurrentInterval(+seconds * 1000);
|
||||
},
|
||||
})}
|
||||
|
||||
Reference in new issue
Block a user