mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Ensure TIMEOUT_MS is positive (Fixes #1264)
This commit is contained in:
parent
d755a7ca01
commit
5825327c27
@ -207,7 +207,6 @@ export async function _actuallySend(
|
||||
|
||||
// Set all the basic options
|
||||
setOpt(Curl.option.FOLLOWLOCATION, settings.followRedirects);
|
||||
setOpt(Curl.option.TIMEOUT_MS, settings.timeout); // 0 for no timeout
|
||||
setOpt(Curl.option.VERBOSE, true); // True so debug function works
|
||||
setOpt(Curl.option.NOPROGRESS, false); // False so progress function works
|
||||
setOpt(Curl.option.ACCEPT_ENCODING, ''); // Auto decode everything
|
||||
@ -319,6 +318,14 @@ export async function _actuallySend(
|
||||
addTimelineText('Preparing request to ' + finalUrl);
|
||||
addTimelineText(`Using ${Curl.getVersion()}`);
|
||||
|
||||
// Set timeout
|
||||
if (settings.timeout > 0) {
|
||||
addTimelineText(`Enable timeout of ${settings.timeout}ms`);
|
||||
setOpt(Curl.option.TIMEOUT_MS, settings.timeout);
|
||||
} else {
|
||||
addTimelineText(`Disable timeout`);
|
||||
}
|
||||
|
||||
// log some things
|
||||
if (renderedRequest.settingEncodeUrl) {
|
||||
addTimelineText('Enable automatic URL encoding');
|
||||
|
Loading…
Reference in New Issue
Block a user