diff --git a/src/lib/ftp-watcher.ts b/src/lib/ftp-watcher.ts index effab2e..a8bd70d 100644 --- a/src/lib/ftp-watcher.ts +++ b/src/lib/ftp-watcher.ts @@ -38,7 +38,7 @@ export async function pollFtp(): Promise<{ processed: number; skipped: number; e return { processed: 0, skipped: 0, error: "FTP not configured" }; } - const client = new Client(); + const client = new Client(15_000); let processed = 0; let skipped = 0; @@ -49,6 +49,7 @@ export async function pollFtp(): Promise<{ processed: number; skipped: number; e user: settings.ftpUser, password: settings.ftpPass, secure: settings.ftpTls, + secureOptions: { rejectUnauthorized: false }, }); log(`Connected to ${settings.ftpHost}:${settings.ftpPort}`); @@ -126,7 +127,7 @@ export async function testFtpConnection(config: { tls: boolean; incomingDir: string; }): Promise<{ ok: boolean; files?: number; error?: string }> { - const client = new Client(); + const client = new Client(15_000); try { await client.access({ host: config.host, @@ -134,6 +135,7 @@ export async function testFtpConnection(config: { user: config.user, password: config.pass, secure: config.tls, + secureOptions: { rejectUnauthorized: false }, }); const files = await client.list(config.incomingDir);