@yolo-croket-dev/core 1.7.25-slowquery.26 → 1.7.25-slowquery.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,18 +19,15 @@ function AbortEvent() {
|
|
|
19
19
|
if (abortSignal.aborted) {
|
|
20
20
|
throw new Error('REQUEST_ABORTED: 작업이 이미 중단되었습니다');
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
const workPromise = originalMethod.apply(this, args);
|
|
24
|
-
const abortPromise = new Promise((_, reject) => {
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
25
23
|
const abortHandler = () => {
|
|
24
|
+
console.log('AbortHandler 실행!!!!!!!!!!!');
|
|
26
25
|
reject(new Error('REQUEST_ABORTED: 작업이 중단되었습니다'));
|
|
27
26
|
};
|
|
28
27
|
abortSignal.addEventListener('abort', abortHandler, { once: true });
|
|
28
|
+
// eslint-disable-next-line no-promise-executor-return
|
|
29
|
+
return originalMethod.apply(this, args);
|
|
29
30
|
});
|
|
30
|
-
return Promise.race([
|
|
31
|
-
workPromise,
|
|
32
|
-
abortPromise,
|
|
33
|
-
]);
|
|
34
31
|
};
|
|
35
32
|
return descriptor;
|
|
36
33
|
};
|