Additional AbortSignal checks

pull/4522/head
awsr 2025-12-31 16:35:21 -08:00
parent 4373b992cd
commit b6f7d92fa0
No known key found for this signature in database
1 changed files with 2 additions and 0 deletions

View File

@ -855,6 +855,7 @@ async function fetchFilesHT(evt, controller) {
}
}
if (controller.signal.aborted) return;
el.files.appendChild(fragment);
const t1 = performance.now();
@ -914,6 +915,7 @@ async function fetchFilesWS(evt) { // fetch file-by-file list over websockets
}
};
ws.onclose = (event) => {
if (controller.signal.aborted) return;
el.files.appendChild(fragment);
// gallerySort();
log(`gallery: folder=${evt.target.name} num=${numFiles} time=${Math.floor(t1 - t0)}ms`);