public override async Task SendKeepAlive() { if (Controller.SyncQueue.Running) { return; } try { await _ftpc.ExecuteAsync("NOOP"); } catch (Exception ex) { ex.LogException(); await Reconnect(); } }
public FtpClient(AccountController account) { Controller = account; _certificates = new X509Certificate2Collection(); _tKeepAlive = new Timer(async state => { if (Controller.SyncQueue.Running || Controller.Account.KeepAliveInterval <= 0) { return; } try { Log.Write(l.Debug, "Sending NOOP"); await _ftpc.ExecuteAsync("NOOP"); } catch (Exception ex) { ex.LogException(); await Reconnect(); } }); }