diff --git a/lib/common/http-client.ts b/lib/common/http-client.ts index cb30d342b2..2eb04f04d7 100644 --- a/lib/common/http-client.ts +++ b/lib/common/http-client.ts @@ -134,14 +134,16 @@ export class HttpClient implements Server.IHttpClient { const requestObj = request(options); cleanupRequestData.req = requestObj; - stuckRequestTimerId = setTimeout(() => { - clearTimeout(stuckRequestTimerId); - stuckRequestTimerId = null; - if (!hasResponse) { - this.setResponseResult(promiseActions, cleanupRequestData, { err: new Error(HttpClient.STUCK_REQUEST_ERROR_MESSAGE) }); - } - }, options.timeout || HttpClient.STUCK_REQUEST_TIMEOUT); - cleanupRequestData.timers.push(stuckRequestTimerId); + if (options.method !== "PUT" && options.method !== "POST") { + stuckRequestTimerId = setTimeout(() => { + clearTimeout(stuckRequestTimerId); + stuckRequestTimerId = null; + if (!hasResponse) { + this.setResponseResult(promiseActions, cleanupRequestData, { err: new Error(HttpClient.STUCK_REQUEST_ERROR_MESSAGE) }); + } + }, options.timeout || HttpClient.STUCK_REQUEST_TIMEOUT); + cleanupRequestData.timers.push(stuckRequestTimerId); + } requestObj .on("error", (err: IHttpRequestError) => {