Additional AbortSignal checks

This commit is contained in:
awsr
2025-12-31 16:35:21 -08:00
parent f7bb9f54fc
commit 820b017dcf
+2
View File
@@ -856,6 +856,7 @@ async function fetchFilesHT(evt, controller) {
}
}
if (controller.signal.aborted) return;
el.files.appendChild(fragment);
const t1 = performance.now();
@@ -915,6 +916,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`);