Skip to content

Commit e929c59

Browse files
committed
fix(sftp): add keepalive interval and debug logging to connection config
1 parent 7908454 commit e929c59

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/services/storage/sftp/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const {
1515

1616
export class SFTPStorage extends StorageClass {
1717
private client: SftpClient;
18+
private keepaliveInterval: number = 5_000; // 5 seconds
1819

1920
constructor() {
2021
super();
@@ -30,6 +31,8 @@ export class SFTPStorage extends StorageClass {
3031
host: hostIp,
3132
port: SFTP_PORT ? +SFTP_PORT : 22,
3233
username: SFTP_USER,
34+
debug: (msg: string) => logger.debug(msg),
35+
keepaliveInterval: this.keepaliveInterval
3336
};
3437

3538
// Authentication: prefer SSH key over password

0 commit comments

Comments
 (0)