(err)
| 400 | async connect() { |
| 401 | await new Promise((resolve, reject) => { |
| 402 | const retry = (err) => { |
| 403 | if (settings.value.retryRemoteFsAfterFail) { |
| 404 | if (++this.#retry > this.#MAX_TRY) { |
| 405 | this.#retry = 0; |
| 406 | reject(err); |
| 407 | } else { |
| 408 | this.connect().then(resolve).catch(reject); |
| 409 | } |
| 410 | } else { |
| 411 | reject(err); |
| 412 | } |
| 413 | }; |
| 414 | |
| 415 | if (this.#authenticationType === "key") { |
| 416 | sftp.connectUsingKeyFile( |