|
@@ -300,10 +300,15 @@ export function FileManagerModal({ printerId, printerName, onClose }: FileManage
|
|
|
return () => window.removeEventListener('keydown', handleKeyDown);
|
|
return () => window.removeEventListener('keydown', handleKeyDown);
|
|
|
}, [onClose]);
|
|
}, [onClose]);
|
|
|
|
|
|
|
|
|
|
+ // No auto-poll: every refetch opens a fresh FTPS connection (TLS handshake
|
|
|
|
|
+ // and all) to the printer, and a 30s interval saturated fragile printer
|
|
|
|
|
+ // controllers like the P1S — MQTT, FTP and the camera all timed out
|
|
|
|
|
+ // together while this modal sat open (#1480). A printer's file list only
|
|
|
|
|
+ // changes on upload / delete (the mutations below invalidate the query)
|
|
|
|
|
+ // or when a print finishes; the manual Refresh button covers the rest.
|
|
|
const { data, isLoading, refetch } = useQuery({
|
|
const { data, isLoading, refetch } = useQuery({
|
|
|
queryKey: ['printerFiles', printerId, currentPath],
|
|
queryKey: ['printerFiles', printerId, currentPath],
|
|
|
queryFn: () => api.getPrinterFiles(printerId, currentPath),
|
|
queryFn: () => api.getPrinterFiles(printerId, currentPath),
|
|
|
- refetchInterval: 30000,
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const { data: storageData } = useQuery({
|
|
const { data: storageData } = useQuery({
|