From d394f265c55e403ea8929c8683e4369d9a359809 Mon Sep 17 00:00:00 2001 From: Selim Mustafaev Date: Sat, 12 Oct 2024 11:30:56 +0300 Subject: [PATCH] Fixing another timeout problem --- data_providers/vin01.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data_providers/vin01.js b/data_providers/vin01.js index 9838552..9177627 100644 --- a/data_providers/vin01.js +++ b/data_providers/vin01.js @@ -1,4 +1,3 @@ -import AbortController from 'abort-controller'; import DebugInfo from '../models/DebugInfo.js'; import Vehicle from '../models/vehicle.js'; import Utils from '../utils/utils.js'; @@ -20,15 +19,16 @@ class Vin01Provider { } static async runCheck(type, vin, token) { - let result = await fetchWithTimeout(reportBaseUrl, { + let result = await fetch(reportBaseUrl, { method: 'POST', body: new URLSearchParams({ typeCheckValue: type, vinValue: vin, key: token, token: null - }) - }, 25000); + }), + signal: AbortSignal.timeout(14000) + }); console.log('Vin01 response for: ', type); return await result.json(); }